Search { public List<String> getSimilarNames() { return response.getSimilarNames(); } 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 testGetSimilarNames() { assertThat(search.getSimilarNames()).isSameAs(search.getResponse().getSimilarNames()); }
@Test public void testgetSimilarNames_nullResponse() { assertThrows(NullPointerException.class, () -> { new Search(fix.requestLevelFour, null).getSimilarNames(); }); }