Question: I want to add @After hook for one of my tests in package. When i run another test from this package(which does not contain @after definition) @after hook is run from that first test.
Is that correct behaviour? How to add @after hook only for that one test?

Answer: 
You need to use a tagged hook so you can choose which scenario runs the code, as opposed to all of them. If you shared your code it'd be easier to understand exactly where you're going wrong, but this is my best guess.

```
@After("@onlyThisTest")
  public void doSomethingOnlyAfterTestsWithThatTag(){
}

```

See [the tagged hooked documentation for more detail](https://cucumber.io/docs/cucumber/api/#tagged-hooks).
This is correct behavior. Take a look at the [Cucumber documentation](https://cucumber.io/docs/cucumber/api/#after)

> 
> After hooks run after the last step of each scenario, even when steps are failed, undefined, pending, or skipped.
> 
> 
>