### Question:
ConfigurationSettingDatabaseConnection extends ConfigurationSettingDataSource { @Override @XmlTransient @JsonIgnore public String getValueAsString() { return ConfigurationSettingDatabaseConnection.getIdentifier(this.dbUrl, this.username, this.system); } ConfigurationSettingDatabaseConnection();  ConfigurationSettingDatabaseConnection(String dbUrl, String username, String password,
                                                DbSystem system); String getDbUrl(); ConfigurationSettingDatabaseConnection setDbUrl(String dbUrl); String getUsername(); ConfigurationSettingDatabaseConnection setUsername(String username); String getPassword(); ConfigurationSettingDatabaseConnection setPassword(String password); DbSystem getSystem(); ConfigurationSettingDatabaseConnection setSystem(DbSystem system); @Override @XmlTransient @JsonIgnore String getValueAsString(); @Override boolean equals(Object o); @Override int hashCode(); @XmlTransient @JsonIgnore static String getIdentifier(String url, String username, DbSystem system); public String type; }### Answer:
@Test public void testGetValueAsString() { String expectedUrl = "url"; String expectedUsername = "username"; String expectedPassword = "password"; DbSystem expectedSystem = DbSystem.PostgreSQL; ConfigurationSettingDatabaseConnection setting = new ConfigurationSettingDatabaseConnection(expectedUrl, expectedUsername, expectedPassword, expectedSystem); String expectedValuesString = expectedUrl + "; " + expectedUsername + "; " + DbSystem.PostgreSQL.name(); String actualValuesString = setting.getValueAsString(); assertEquals(expectedValuesString, actualValuesString); }