@Test public void testCreateMeteringConfigs() { MeteringConfigView result = underTest.createMeteringConfigs(true, "AWS", "myName", "myCrn", "DATAHUB", "1.0.0"); assertTrue(result.isEnabled()); assertEquals("DATAHUB", result.getServiceType()); assertEquals("stream", result.getStreamName()); }
public MeteringConfigView createMeteringConfigs(boolean enabled, String platform, String clusterCrn, String clusterName, String serviceType, String serviceVersion) { MeteringConfigView.Builder builder = new MeteringConfigView.Builder(); if (enabled) { builder.withPlatform(platform) .withClusterCrn(clusterCrn) .withClusterName(clusterName) .withServiceType(StringUtils.upperCase(serviceType)) .withServiceVersion(serviceVersion) .withStreamName(meteringConfiguration.getDbusStreamName()); } return builder .withEnabled(enabled) .build(); }
MeteringConfigService { public MeteringConfigView createMeteringConfigs(boolean enabled, String platform, String clusterCrn, String clusterName, String serviceType, String serviceVersion) { MeteringConfigView.Builder builder = new MeteringConfigView.Builder(); if (enabled) { builder.withPlatform(platform) .withClusterCrn(clusterCrn) .withClusterName(clusterName) .withServiceType(StringUtils.upperCase(serviceType)) .withServiceVersion(serviceVersion) .withStreamName(meteringConfiguration.getDbusStreamName()); } return builder .withEnabled(enabled) .build(); } }
MeteringConfigService { public MeteringConfigView createMeteringConfigs(boolean enabled, String platform, String clusterCrn, String clusterName, String serviceType, String serviceVersion) { MeteringConfigView.Builder builder = new MeteringConfigView.Builder(); if (enabled) { builder.withPlatform(platform) .withClusterCrn(clusterCrn) .withClusterName(clusterName) .withServiceType(StringUtils.upperCase(serviceType)) .withServiceVersion(serviceVersion) .withStreamName(meteringConfiguration.getDbusStreamName()); } return builder .withEnabled(enabled) .build(); } MeteringConfigService(MeteringConfiguration meteringConfiguration); }
MeteringConfigService { public MeteringConfigView createMeteringConfigs(boolean enabled, String platform, String clusterCrn, String clusterName, String serviceType, String serviceVersion) { MeteringConfigView.Builder builder = new MeteringConfigView.Builder(); if (enabled) { builder.withPlatform(platform) .withClusterCrn(clusterCrn) .withClusterName(clusterName) .withServiceType(StringUtils.upperCase(serviceType)) .withServiceVersion(serviceVersion) .withStreamName(meteringConfiguration.getDbusStreamName()); } return builder .withEnabled(enabled) .build(); } MeteringConfigService(MeteringConfiguration meteringConfiguration); MeteringConfigView createMeteringConfigs(boolean enabled, String platform, String clusterCrn, String clusterName, String serviceType,
            String serviceVersion); }
MeteringConfigService { public MeteringConfigView createMeteringConfigs(boolean enabled, String platform, String clusterCrn, String clusterName, String serviceType, String serviceVersion) { MeteringConfigView.Builder builder = new MeteringConfigView.Builder(); if (enabled) { builder.withPlatform(platform) .withClusterCrn(clusterCrn) .withClusterName(clusterName) .withServiceType(StringUtils.upperCase(serviceType)) .withServiceVersion(serviceVersion) .withStreamName(meteringConfiguration.getDbusStreamName()); } return builder .withEnabled(enabled) .build(); } MeteringConfigService(MeteringConfiguration meteringConfiguration); MeteringConfigView createMeteringConfigs(boolean enabled, String platform, String clusterCrn, String clusterName, String serviceType,
            String serviceVersion);  }