### Question:
AbbyyFactory extends OcrFactoryWithProperties { protected Properties getCombinedProps() { String configFile = userProperties.getProperty("abbyy.config", "gbv-antiqua.properties"); FileAccess fileAccess = beanProvider.getFileAccess(); Properties fileProps = fileAccess.getPropertiesFromFile(configFile); Properties combinedProps = new Properties(fileProps); for (String userKey : userProperties.stringPropertyNames()) { combinedProps.setProperty(userKey, userProperties.getProperty(userKey)); } return combinedProps; } AbbyyFactory(Properties userProperties); @Override OcrEngine createEngine(); @Override OcrProcess createProcess();  }### Answer:
@Test public void shouldCombineProperties() { Properties combinedProps = factorySut.getCombinedProps(); assertEquals("userValue", combinedProps.getProperty("userKey")); assertEquals("fileValue", combinedProps.getProperty("fileKey")); }
@Test public void shouldUseDefaultConfigFile() { factorySut.getCombinedProps(); verify(fileAccessMock).getPropertiesFromFile("gbv-antiqua.properties"); }