### Question:
HibernateContactFinderQueryBuilder { public void setFilter(Contact filter) { if (filter == null) { throw new IllegalArgumentException("Null value not allowed."); } this.filter = filter; }  String buildHql(); void setQueryParam(QueryParam queryParam); void setFilter(Contact filter); void setCount(boolean count); String[] getParameters(); AbstractSingleColumnStandardBasicType<?>[] getTypes();  }### Answer:
@Test public void testFilterCannotBeNull() throws Exception { try { builder.setFilter(null); fail("IllegalArgumentException expected"); } catch (IllegalArgumentException expected) { assertTrue(true); } }