@Test void testNullDriver() throws Exception { assertThatThrownBy(() -> new SimpleDatabasePlatformSupport() .getDriverClassNameForDatabase(null)) .isInstanceOf(IllegalArgumentException.class) .hasMessageContaining("must not be null"); }
@Override public String getDriverClassNameForDatabase(DatabaseType databaseType) { Assert.notNull(databaseType, "databaseType must not be null"); String candidate = this.getDriverClassNameMappings().get(databaseType); Assert.notNull(candidate, String.format( "No driver class name found for database :'%s'", databaseType.name())); return candidate; }
MapBasedDatabasePlatformSupport implements DatabasePlatformSupport { @Override public String getDriverClassNameForDatabase(DatabaseType databaseType) { Assert.notNull(databaseType, "databaseType must not be null"); String candidate = this.getDriverClassNameMappings().get(databaseType); Assert.notNull(candidate, String.format( "No driver class name found for database :'%s'", databaseType.name())); return candidate; } }
MapBasedDatabasePlatformSupport implements DatabasePlatformSupport { @Override public String getDriverClassNameForDatabase(DatabaseType databaseType) { Assert.notNull(databaseType, "databaseType must not be null"); String candidate = this.getDriverClassNameMappings().get(databaseType); Assert.notNull(candidate, String.format( "No driver class name found for database :'%s'", databaseType.name())); return candidate; }  }
MapBasedDatabasePlatformSupport implements DatabasePlatformSupport { @Override public String getDriverClassNameForDatabase(DatabaseType databaseType) { Assert.notNull(databaseType, "databaseType must not be null"); String candidate = this.getDriverClassNameMappings().get(databaseType); Assert.notNull(candidate, String.format( "No driver class name found for database :'%s'", databaseType.name())); return candidate; }  @Override String getDriverClassNameForDatabase(DatabaseType databaseType); @Override String getDatabaseUrlForDatabase(DatabaseType databaseType, String hostname,
			int port, String databaseName); }
MapBasedDatabasePlatformSupport implements DatabasePlatformSupport { @Override public String getDriverClassNameForDatabase(DatabaseType databaseType) { Assert.notNull(databaseType, "databaseType must not be null"); String candidate = this.getDriverClassNameMappings().get(databaseType); Assert.notNull(candidate, String.format( "No driver class name found for database :'%s'", databaseType.name())); return candidate; }  @Override String getDriverClassNameForDatabase(DatabaseType databaseType); @Override String getDatabaseUrlForDatabase(DatabaseType databaseType, String hostname,
			int port, String databaseName);  }