### Question:
YamlDataHandlerFactory implements DataHandlerFactory { public DataHandler create(final InputStream src) { final DataHandlerModel dataHandlerModel = reader.readDataHandlerModel(src); return dataHandlerModelFactory.createDataHandler(dataHandlerModel); } YamlDataHandlerFactory(final DataHandlerModelFactory dataHandlerModelFactory); DataHandler create(final InputStream src);  }### Answer:
@Test public void testCreateYamlDataHandler() { final InputStream inputStream = ResourceUtils.getInputStream(TEST_DEFAULT_YAML_MAPPING_1); final DataHandler expectedDataHandler = mock(DataHandler.class); given(dataHandlerModelFactory.createDataHandler(any())) .willReturn(expectedDataHandler); final DataHandler dataHandlerModel = yamlDataHandlerFactory.create(inputStream); assertThat(dataHandlerModel, equalTo(expectedDataHandler)); verify(dataHandlerModelFactory).createDataHandler(any()); }