### Question:
IdmLightConfig { @Default public String getDbConnectionString() { return getDbConnectionStringPrefix() + getDbDirectory() + File.separatorChar + getDbName(); }  @Default String getDbName(); @Default String getDbDirectory(); @Default String getDbDriver(); abstract String getDbUser(); abstract String getDbPwd(); @Default int getDbValidTimeOut(); @Default String getDbConnectionStringPrefix(); @Default String getDbConnectionString(); void log();  }### Answer:
@Test public void testCustomDirectory() { IdmLightConfigBuilder builder = new IdmLightConfigBuilder(); builder.dbUser("foo").dbPwd("bar"); builder.dbDirectory("target"); IdmLightConfig config = builder.build(); assertThat(config.getDbConnectionString()).isEqualTo("jdbc:h2:target/idmlight.db"); }
@Test public void testCustomConnectionString() { IdmLightConfigBuilder builder = new IdmLightConfigBuilder(); builder.dbUser("foo").dbPwd("bar"); builder.dbConnectionString("jdbc:mysql: IdmLightConfig config = builder.build(); assertThat(config.getDbConnectionString()).isEqualTo("jdbc:mysql: }