Feature implements Comparable<Feature> { public boolean searchProperty(String property) { boolean found = false; if(properties.containsKey(property)){ found = true; }else if (propertiesRelations != null){ int j = 0; while (j < propertiesRelations.size() && !found) { Map<String,String> propertyRelation = propertiesRelations.get(j); if(propertyRelation.containsKey(property)){ found = true; } j++; } } return found; } Feature(Geometry geometry,Map<String,String> properties);  Feature(); List<Map<String, String>> getPropertiesRelations(); void setPropertiesRelations(
			List<Map<String, String>> propertiesRelations); void setProperties(Map<String, String> properties); Map<String, String> getProperties(); String getId(); void setId(String id); String getType(); Geometry getGeometry(); void setGeometry(Geometry geometry); void updateProperties(final List<Map<String,String>> newInheritedProperties); List<Map<String, String>> getAllProperties(); boolean searchProperty(String property); String getValueRelationProperties(String property); @Override String toString(); int compareTo(Feature f);  }
@Test public void searchProperty_and_FounditinProperties(){ String property="property"; Mockito.when(properties.containsKey(property)).thenReturn(true); boolean ret = feature.searchProperty(property); Assert.assertTrue("Return must be true", ret); }