MetricsValidation { public static boolean isValidKsqlModuleType(String moduleType) { for (KSqlValidModuleType type: KSqlValidModuleType.values()) { if (moduleType.equals(type.name())) { return true; } } return false; }  static boolean isValidKsqlModuleType(String moduleType);  }
@Test public void testValidKsqlDeploymentMode() { ImmutableList<String> validDeploymentModes = ImmutableList.of( "LOCAL_CLI", "REMOTE_CLI", "SERVER", "EMBEDDED", "CLI" ); for (String mode: validDeploymentModes) { assertTrue("Expected KSQL deployment mode '" + mode + "' to be valid", MetricsValidation.isValidKsqlModuleType(mode)); } }
@Test public void testInvalidKsqlDeploymentMode() { ImmutableList<String> invalidDeploymentModes = ImmutableList.of( "local_CLI", "REMOTECLI", "servER", "random", "ANOTHER_CLI" ); for (String mode: invalidDeploymentModes) { assertFalse("Expected KSQL deployment mode '" + mode + "' to be invalid", MetricsValidation.isValidKsqlModuleType(mode)); } }