use of com.sequenceiq.cloudbreak.api.endpoint.v4.common.ResourceStatus.USER_MANAGED in project cloudbreak by hortonworks.
the class ClusterToClusterV4RequestConverterTest method testConvertWhenRdsConfigsContainsElementsThenUserManagedOnesNameShouldBeStored.
@Test
public void testConvertWhenRdsConfigsContainsElementsThenUserManagedOnesNameShouldBeStored() {
RDSConfig notUserManaged = new RDSConfig();
notUserManaged.setId(0L);
notUserManaged.setStatus(DEFAULT);
RDSConfig userManaged = new RDSConfig();
notUserManaged.setId(1L);
userManaged.setStatus(USER_MANAGED);
Set<RDSConfig> rdsConfigs = new LinkedHashSet<>(2);
rdsConfigs.add(notUserManaged);
rdsConfigs.add(userManaged);
when(cluster.getRdsConfigs()).thenReturn(rdsConfigs);
ClusterV4Request result = underTest.convert(cluster);
assertEquals(1L, result.getDatabases().size());
}
Aggregations