### Question:
DefaultImportsEditorWidget extends ImportsEditorWidget<DefaultImport> { public String getDataType(String displayName) { return dataTypes.keySet() .stream() .filter(key -> displayName.equals(dataTypes.get(key))) .findFirst() .orElse(displayName); } @Inject  DefaultImportsEditorWidget(final SessionManager sessionManager,
                                      final DataTypeNamesService dataTypeNamesService,
                                      final Event<NotificationEvent> notification); Map<String, String> getDataTypes(); String getDataType(String displayName); @Override DefaultImport createImport();  }### Answer:
@Test public void getDataType() { tested.dataTypes = new TreeMap<>(); final String testValue = "testValue"; tested.dataTypes.put(testValue, testValue); String result = tested.getDataType(testValue); assertEquals(testValue, result); }
@Test public void getCustomDataType() { final String testValue = "customValue"; String result = tested.getDataType(testValue); assertEquals(testValue, result); }