Search { public boolean isRejected() { return response.isRejected(); } Search(Request request, Response response); Request getRequest(); Response getResponse(); boolean isRejected(); List<String> getSimilarNames(); boolean responseMessageAppliesTo(String streetName); ResponseStatus getResponseStatus(); int getLevel(); boolean lessThanOrEqualTo(int level); @Override String toString();  }
@Test public void testIsRejected() { assertFalse(search.isRejected()); assertTrue(new Search(fix.requestLevelFour, fix.responseReject).isRejected()); }
@Test public void testIsRejected_nullResponse() { assertThrows(NullPointerException.class, () -> { new Search(fix.requestLevelFour, null).isRejected(); }); }