Response { public boolean messageAppliesTo(String streetName) { GeosupportReturnCode grc = this.responseStatus.getGeosupportReturnCode(); return StringUtils.containsIgnoreCase(grc.getMessage(), streetName); } Response(ResponseStatus responseStatus, Map<String, Object> geocodes); boolean messageAppliesTo(String streetName); boolean isCompassDirectionRequired(); boolean isRejected(); int similarNamesCount(); List<String> getSimilarNames(); ResponseStatus getResponseStatus(); Map<String, Object> getGeocodes(); ReadableInstant getTimestamp(); @Override String toString();  }
@Test public void testMessageAppliesTo() { assertFalse(response.messageAppliesTo(null)); assertFalse(response.messageAppliesTo("truck")); response.getResponseStatus().getGeosupportReturnCode().setMessage("Street 'TRUCK STREET' not recognized"); assertTrue(response.messageAppliesTo("truck")); assertFalse(response.messageAppliesTo("duck")); assertFalse(response.messageAppliesTo(null)); }