class PropertyManager {

    public void setCustomParametersFile(String customParametersFile) throws CluecumberPluginException {
        this.customParametersFile = customParametersFile;
        if (!isSet(customParametersFile)) {
            return;
        }
        if (!fileIO.isExistingFile(customParametersFile)) {
            throw new MissingFileException(customParametersFile + " (customParametersFile)");
        }
        Map<String, String> customParameters = propertiesFileLoader.loadPropertiesMap(customParametersFile);
        this.customParameters.putAll(customParameters);
    }

}

class PropertyManagerTest {

    private PropertyManager propertyManager;
    private CluecumberLogger logger;
    private FileIO fileIO;

    @Test(expected = MissingFileException.class)
    public void setCustomParametersFileNonExistingTest() throws CluecumberPluginException {

        String customParametersFile = "customParametersFile";
        when(fileIO.isExistingFile(customParametersFile)).thenReturn(false);
        propertyManager.setCustomParametersFile(customParametersFile);
    }

}