Response { public List<String> getSimilarNames() { return responseStatus.getSimilarNames(); } 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 testGetSimilarNames() { assertFalse(response.getSimilarNames().contains("abc")); assertThat(response.getSimilarNames()).isSameAs(response.getResponseStatus().getSimilarNames()); response.getResponseStatus().getSimilarNames().add("abc"); assertTrue(response.getSimilarNames().contains("abc")); }