Search in sources :

Example 56 with DatabaseServerV4Response

use of com.sequenceiq.redbeams.api.endpoint.v4.databaseserver.responses.DatabaseServerV4Response in project cloudbreak by hortonworks.

the class DatabaseServerV4ControllerTest method testGetByCrn.

@Test
public void testGetByCrn() {
    when(service.getByCrn(SERVER_CRN)).thenReturn(server);
    when(databaseServerConfigToDatabaseServerV4ResponseConverter.convert(any())).thenReturn(serverResponse);
    DatabaseServerV4Response response = underTest.getByCrn(SERVER_CRN);
    assertEquals(serverResponse.getId().longValue(), response.getId().longValue());
}
Also used : DatabaseServerV4Response(com.sequenceiq.redbeams.api.endpoint.v4.databaseserver.responses.DatabaseServerV4Response) Test(org.junit.Test)

Aggregations

DatabaseServerV4Response (com.sequenceiq.redbeams.api.endpoint.v4.databaseserver.responses.DatabaseServerV4Response)54 Test (org.junit.jupiter.api.Test)27 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)19 Cluster (com.sequenceiq.cloudbreak.domain.stack.cluster.Cluster)16 SslConfigV4Response (com.sequenceiq.redbeams.api.endpoint.v4.databaseserver.responses.SslConfigV4Response)13 Stack (com.sequenceiq.cloudbreak.domain.stack.Stack)12 DatabaseServerConfig (com.sequenceiq.redbeams.domain.DatabaseServerConfig)9 DBStack (com.sequenceiq.redbeams.domain.stack.DBStack)7 Test (org.junit.Test)6 StackDatabaseServerResponse (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.database.StackDatabaseServerResponse)5 AllocateDatabaseServerV4Request (com.sequenceiq.redbeams.api.endpoint.v4.databaseserver.requests.AllocateDatabaseServerV4Request)5 DatabaseServerSslConfig (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.database.DatabaseServerSslConfig)4 SdxCluster (com.sequenceiq.datalake.entity.SdxCluster)4 DatabaseServerStatusV4Response (com.sequenceiq.redbeams.api.endpoint.v4.databaseserver.responses.DatabaseServerStatusV4Response)4 SslConfig (com.sequenceiq.redbeams.domain.stack.SslConfig)4 Date (java.util.Date)4 RDSConfig (com.sequenceiq.cloudbreak.domain.RDSConfig)3 SecretResponse (com.sequenceiq.cloudbreak.service.secret.model.SecretResponse)3 NotFoundException (javax.ws.rs.NotFoundException)3 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)3