### Question:
SaveQueryResults { public boolean isConfigurationValid() { return !this.saveResults || ((this.outputQueryResultDirectory != null) && !this.outputQueryResultDirectory.isEmpty()); } SaveQueryResults();  SaveQueryResults(final boolean saveResults, final String outputDir); boolean isConfigurationValid(); boolean isDirectoryValid(); boolean isSaveResults(); void setSaveResults(final boolean saveResults); String getOutputQueryResultDirectory(); void setOutputQueryResultDirectory(final String outputQueryResultDirectory); static final String DEFAULT_OUTPUT_DIR_NAME; }### Answer:
@Test public void isConfigurationValid_saveTrueDefaultDir_valid() { assertTrue(saveTrueDefaultDir.isConfigurationValid()); }
@Test public void isConfigurationValid_saveTrueEmptyDir_notValid() { assertFalse(saveTrueEmptyDir.isConfigurationValid()); }
@Test public void isConfigurationValid_saveTrueNullDir_notValid() { assertFalse(saveTrueNullDir.isConfigurationValid()); }
@Test public void isConfigurationValid_saveFalseDefaultDir_valid() { assertTrue(saveFalseDefaultDir.isConfigurationValid()); }
@Test public void isConfigurationValid_saveFalseEmptyDir_valid() { assertTrue(saveFalseEmptyDir.isConfigurationValid()); }
@Test public void isConfigurationValid_saveFalseNullDir_valid() { assertTrue(saveFalseNullDir.isConfigurationValid()); }