@Test public <S> void findTopEntry() { CompositeEntryMatcher<T> matcher = new CompositeEntryMatcher<>(testCase.components); HttpRespondable response = matcher.findTopEntry(testCase.state, testCase.request); assertEquals(testCase.describe(), testCase.expectedResponse, response); }
@Nullable @Override public HttpRespondable findTopEntry(S state, ParsedRequest request) { for (EntryMatcher<? super S> component : components) { HttpRespondable respondable = component.findTopEntry(state, request); if (respondable != null) { return respondable; } } return null; }
CompositeEntryMatcher implements EntryMatcher<S> { @Nullable @Override public HttpRespondable findTopEntry(S state, ParsedRequest request) { for (EntryMatcher<? super S> component : components) { HttpRespondable respondable = component.findTopEntry(state, request); if (respondable != null) { return respondable; } } return null; } }
CompositeEntryMatcher implements EntryMatcher<S> { @Nullable @Override public HttpRespondable findTopEntry(S state, ParsedRequest request) { for (EntryMatcher<? super S> component : components) { HttpRespondable respondable = component.findTopEntry(state, request); if (respondable != null) { return respondable; } } return null; } CompositeEntryMatcher(Iterable<EntryMatcher<? super S>> components); }
CompositeEntryMatcher implements EntryMatcher<S> { @Nullable @Override public HttpRespondable findTopEntry(S state, ParsedRequest request) { for (EntryMatcher<? super S> component : components) { HttpRespondable respondable = component.findTopEntry(state, request); if (respondable != null) { return respondable; } } return null; } CompositeEntryMatcher(Iterable<EntryMatcher<? super S>> components); @Nullable @Override HttpRespondable findTopEntry(S state, ParsedRequest request); }
CompositeEntryMatcher implements EntryMatcher<S> { @Nullable @Override public HttpRespondable findTopEntry(S state, ParsedRequest request) { for (EntryMatcher<? super S> component : components) { HttpRespondable respondable = component.findTopEntry(state, request); if (respondable != null) { return respondable; } } return null; } CompositeEntryMatcher(Iterable<EntryMatcher<? super S>> components); @Nullable @Override HttpRespondable findTopEntry(S state, ParsedRequest request);  }