### Question:
DataTypeHandler { List<DataType> getSubDataTypesByType(final String type) { return new DataTypeQuery().where(dataType -> Objects.equals(dataType.getType(), type)).collect(); } DataTypeHandler(final DataTypeStore dataTypeStore,
                    final DataTypeManager dataTypeManager); void init(final ItemDefinitionRecordEngine recordEngine);  }### Answer:
@Test public void testGetSubDataTypesByType() { final String type = "tCity"; final DataType dataType0 = makeDataType("tPerson", "Structure"); final DataType dataType1 = makeDataType("tCity", "Structure"); final DataType dataType2 = makeDataType("city1", "tCity"); final DataType dataType3 = makeDataType("city2", "tCity"); final DataType dataType4 = makeDataType("tCompany", "Structure"); when(dataTypeStore.getTopLevelDataTypes()).thenReturn(asList(dataType0, dataType1, dataType2, dataType3, dataType4)); final List<DataType> expectedDataTypes = asList(dataType2, dataType3); final List<DataType> actualDataTypes = handler.getSubDataTypesByType(type); assertEquals(expectedDataTypes, actualDataTypes); }