Search { public boolean responseMessageAppliesTo(String streetName) { return this.response.messageAppliesTo(streetName); } 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 testResponseMessageAppliesTo() { String streetName = "FOO"; assertThat(search.responseMessageAppliesTo(streetName)) .isEqualTo(search.getResponse().messageAppliesTo(streetName)); assertFalse(search.responseMessageAppliesTo(streetName)); search.getResponse().getResponseStatus().getGeosupportReturnCode().setMessage(streetName); assertThat(search.responseMessageAppliesTo(streetName)) .isEqualTo(search.getResponse().messageAppliesTo(streetName)); assertTrue(search.responseMessageAppliesTo(streetName)); }
@Test public void testResponseMessageAppliesTo_nullResponse() { assertThrows(NullPointerException.class, () -> { new Search(fix.requestLevelFour, null).responseMessageAppliesTo("foo"); }); }