@Test void convert() { List<CloudNoSqlTable> tables = List.of(new CloudNoSqlTable("a"), new CloudNoSqlTable("b")); CloudNoSqlTables source = new CloudNoSqlTables(tables); PlatformNoSqlTablesResponse result = underTest.convert(source); List<PlatformNoSqlTableResponse> noSqlTables = result.getNoSqlTables(); assertNotNull(noSqlTables); assertEquals(tables.size(), noSqlTables.size()); tables.forEach(t -> { assertTrue(noSqlTables.stream().anyMatch(s -> t.getName().equals(s.getName()))); }); }
@Override public PlatformNoSqlTablesResponse convert(CloudNoSqlTables source) { List<PlatformNoSqlTableResponse> result = source.getCloudNoSqlTables() .stream() .map(t -> new PlatformNoSqlTableResponse(t.getName())) .collect(Collectors.toList()); return new PlatformNoSqlTablesResponse(result); }
CloudNoSqlTablesToPlatformNoSqlTablesV1ResponseConverter extends AbstractConversionServiceAwareConverter<CloudNoSqlTables, PlatformNoSqlTablesResponse> { @Override public PlatformNoSqlTablesResponse convert(CloudNoSqlTables source) { List<PlatformNoSqlTableResponse> result = source.getCloudNoSqlTables() .stream() .map(t -> new PlatformNoSqlTableResponse(t.getName())) .collect(Collectors.toList()); return new PlatformNoSqlTablesResponse(result); } }
CloudNoSqlTablesToPlatformNoSqlTablesV1ResponseConverter extends AbstractConversionServiceAwareConverter<CloudNoSqlTables, PlatformNoSqlTablesResponse> { @Override public PlatformNoSqlTablesResponse convert(CloudNoSqlTables source) { List<PlatformNoSqlTableResponse> result = source.getCloudNoSqlTables() .stream() .map(t -> new PlatformNoSqlTableResponse(t.getName())) .collect(Collectors.toList()); return new PlatformNoSqlTablesResponse(result); }  }
CloudNoSqlTablesToPlatformNoSqlTablesV1ResponseConverter extends AbstractConversionServiceAwareConverter<CloudNoSqlTables, PlatformNoSqlTablesResponse> { @Override public PlatformNoSqlTablesResponse convert(CloudNoSqlTables source) { List<PlatformNoSqlTableResponse> result = source.getCloudNoSqlTables() .stream() .map(t -> new PlatformNoSqlTableResponse(t.getName())) .collect(Collectors.toList()); return new PlatformNoSqlTablesResponse(result); }  @Override PlatformNoSqlTablesResponse convert(CloudNoSqlTables source); }
CloudNoSqlTablesToPlatformNoSqlTablesV1ResponseConverter extends AbstractConversionServiceAwareConverter<CloudNoSqlTables, PlatformNoSqlTablesResponse> { @Override public PlatformNoSqlTablesResponse convert(CloudNoSqlTables source) { List<PlatformNoSqlTableResponse> result = source.getCloudNoSqlTables() .stream() .map(t -> new PlatformNoSqlTableResponse(t.getName())) .collect(Collectors.toList()); return new PlatformNoSqlTablesResponse(result); }  @Override PlatformNoSqlTablesResponse convert(CloudNoSqlTables source);  }