### Question:
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);  }### Answer:
@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()); }
@Test public void testCreateMeteringConfigsWithLowercaseServiceType() { MeteringConfigView result = underTest.createMeteringConfigs(true, "AWS", "myName", "myCrn", "datahub", "1.0.0"); assertTrue(result.isEnabled()); assertEquals("DATAHUB", result.getServiceType()); }
@Test public void testCreateMeteringConfigsIfDisabled() { MeteringConfigView result = underTest.createMeteringConfigs(false, "AWS", "myName", "myCrn", "DATAHUB", "1.0.0"); assertFalse(result.isEnabled()); }