### Question:
Thing { public Map<String, P> getPropertiesByObjectType(String objectType) { return getPropertiesByExpandedObjectType(getExpandedObjectType(objectType)); } @SuppressWarnings("squid:S107")  Thing(String objectType,
          Context objectContext,
          String id,
          String title,
          Map<String, String> titles,
          String description,
          Map<String, String> descriptions,
          Map<String, P> properties,
          Map<String, A> actions,
          Map<String, E> events,
          List<Form> forms,
          List<String> security,
          Map<String, SecurityScheme> securityDefinitions,
          String base);  Thing(); String getObjectType(); Context getObjectContext(); String getTitle(); Map<String, String> getTitles(); String getDescription(); Map<String, String> getDescriptions(); List<Form> getForms(); P getProperty(String name); Map<String, A> getActions(); A getAction(String name); Map<String, E> getEvents(); E getEvent(String name); String getBase(); @Override int hashCode(); String getId(); @Override boolean equals(Object obj); @Override String toString(); String toJson(); String toJson(boolean prettyPrint); Map<String, P> getPropertiesByObjectType(String objectType); Map<String, P> getPropertiesByExpandedObjectType(String objectType); String getExpandedObjectType(String objectType); Map<String, P> getProperties(); static String randomId(); static Thing fromJson(String json); static Thing fromJson(File json); static Thing fromMap(Map<String, Map> map);  }### Answer:
@Test public void getPropertiesByObjectType() { String json = "{\n" + " \"id\" : \"KlimabotschafterWetterstationen:Ahrensburg\",\n" + " \"title\" : \"KlimabotschafterWetterstationen:Ahrensburg\",\n" + " \"properties\" : {\n" + " \"Hum_2m\" : {\n" + " \"description\" : \"Relative Luftfeuchtigkeit 2 m in %\",\n" + " \"type\" : \"number\",\n" + " \"observable\" : true,\n" + " \"readOnly\" : true,\n" + " \"classType\" : \"java.lang.Object\",\n" + " \"@type\" : \"saref:Humidity\"\n" + " },\n" + " \"Temp_2m\" : {\n" + " \"description\" : \"Temperatur in 2m in Grad Celsisus\",\n" + " \"type\" : \"number\",\n" + " \"observable\" : true,\n" + " \"readOnly\" : true,\n" + " \"classType\" : \"java.lang.Object\",\n" + " \"@type\" : \"saref:Temperature\",\n" + " \"om:unit_of_measure\" : \"om:degree_Celsius\"\n" + " }\n" + " },\n" + " \"@type\" : \"Thing\",\n" + " \"@context\" : [ \"http: " \"sane\" : \"https: " \"saref\" : \"https: " \"sch\" : \"http: " \"om\" : \"http: " } ]\n" + "}"; Thing thing = Thing.fromJson(json); assertEquals(1, thing.getPropertiesByObjectType("saref:Temperature").size()); }