### Question:
SimpleStringFilter implements Filter { @Override public boolean passesFilter(Object itemId, Item item) { final Property<?> p = item.getItemProperty(propertyId); if (p == null) { return false; } Object propertyValue = p.getValue(); if (propertyValue == null) { return false; } final String value = ignoreCase ? propertyValue.toString() .toLowerCase() : propertyValue.toString(); if (onlyMatchPrefix) { if (!value.startsWith(filterString)) { return false; } } else { if (!value.contains(filterString)) { return false; } } return true; } SimpleStringFilter(Object propertyId, String filterString,
            boolean ignoreCase, boolean onlyMatchPrefix); @Override boolean passesFilter(Object itemId, Item item); @Override boolean appliesToProperty(Object propertyId); @Override boolean equals(Object obj); @Override int hashCode(); Object getPropertyId(); String getFilterString(); boolean isIgnoreCase(); boolean isOnlyMatchPrefix();  }### Answer:
@Test public void testNullValueForProperty() { TestItem<String, String> item = createTestItem(); item.addItemProperty("other1", new NullProperty()); Assert.assertFalse(f("other1", "ab", false, true).passesFilter(null, item)); }