CloudEventsResourceGenerator { String sanitizeEmitterName(String triggerName) { return String.join("", EMITTER_PREFIX, triggerName.replaceAll("[^a-zA-Z0-9]+", "")); } CloudEventsResourceGenerator(final List<ProcessExecutableModelGenerator> generators, final DependencyInjectionAnnotator annotator);   CloudEventsResourceGenerator(final List<ProcessExecutableModelGenerator> generators); String generatedFilePath(); String generate();  }
@Test void verifyEmitterVariableNameGen() { final CloudEventsResourceGenerator generator = new CloudEventsResourceGenerator(Collections.emptyList()); final Map<String, String> tableTest = new HashMap<>(); tableTest.put("http: tableTest.put("$%@1234whatever123", EMITTER_PREFIX + "1234whatever123"); tableTest.put("123.12.34.56", EMITTER_PREFIX + "123123456"); tableTest.put("this_is_a_test", EMITTER_PREFIX + "thisisatest"); tableTest.forEach((key, value) -> assertThat(generator.sanitizeEmitterName(key)).isEqualTo(value)); }