### Question:
AzureDatabaseServerView { public String getDatabaseType() { if (databaseServer.getEngine() == null) { return null; } switch (databaseServer.getEngine()) { case POSTGRESQL: return "postgres"; default: throw new IllegalStateException("Unsupported Azure Database Server engine " + databaseServer.getEngine()); } } AzureDatabaseServerView(DatabaseServer databaseServer); Long getAllocatedStorageInMb(); Integer getBackupRetentionDays(); Integer getSkuCapacity(); String getSkuFamily(); String getSkuName(); String getSkuTier(); String getDbServerName(); String getDatabaseType(); String getDbVersion(); Boolean getGeoRedundantBackup(); Boolean getStorageAutoGrow(); String getAdminLoginName(); String getAdminPassword(); Integer getPort(); String getLocation();  }### Answer:
@Test public void testDatabaseType() { when(server.getEngine()).thenReturn(DatabaseEngine.POSTGRESQL); assertThat(underTest.getDatabaseType()).isEqualTo("postgres"); }