AgentDirective implements Directive, Matchable<String> { @Override public Matcher<String> getMatcher() { return agentMatcher; } AgentDirective(@Nonnull String agentPattern, @Nonnull Matcher<String> agentMatcher); @Nonnull @Override String getField(); @Nonnull @Override String getValue(); @Override Matcher<String> getMatcher(); @Override boolean equals(@Nullable Object o); @Override int hashCode(); @Nonnull @Override String toString();  }
@Test public void givenValidAgentDirective_whenGetMatcher_thenResultEqualsExpected() { AgentDirective agentDirective = new AgentDirective(PATTERN, MATCHER); Matcher<String> actualMatcher = agentDirective.getMatcher(); assertThat(actualMatcher, equalTo(MATCHER)); }