)
.build();
when(testResource.toFullDTO(any(Connection.class))).thenCallRealMethod();
when(testResource.toOwnerDTO(any(Connection.class),any(ConnectionResponseDTO.class))).thenCallRealMethod();
ConnectionResponseDTO dto = testResource.toFullDTO(c);
//Test some fields
Assert.assertEquals(AuthType.NONE, dto.getAuthType());
Assert.assertEquals(c.getAlias(), dto.getAlias());
Assert.assertEquals(c.getUrl(), dto.getUrl());
List<OutboundConfigurationResponseDTO> outboundDTOs = dto.getOutboundConfigurations();
Assert.assertEquals(1, outboundDTOs.size());
Assert.assertEquals("s3", outboundDTOs.get(0).getProtocol());
Assert.assertEquals("my.bucket.name", outboundDTOs.get(0).getDestination());
Assert.assertEquals("/key/prefix/here/", outboundDTOs.get(0).getNamespace());
Assert.assertEquals("PROCESSED", outboundDTOs.get(0).getDataTypes().get(0).toString());