Search { public boolean lessThanOrEqualTo(int level) { return getLevel() <= level; } 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 testLessThanOrEqualTo() { search.getRequest().setLevel(128); assertThat(search.getLevel()).isEqualTo(128); assertTrue(search.lessThanOrEqualTo(256)); assertTrue(search.lessThanOrEqualTo(128)); assertFalse(search.lessThanOrEqualTo(12)); }