### Question:
JsonModule implements StatefulFunctionModule { public void configure(Map<String, String> conf, Binder binder) { try { ENTITIES.forEach(jsonEntity -> jsonEntity.bind(binder, moduleSpecNode, formatVersion)); } catch (Throwable t) { throw new ModuleConfigurationException( format("Error while parsing module at %s", moduleUrl), t); } } JsonModule(JsonNode moduleSpecNode, FormatVersion formatVersion, URL moduleUrl); void configure(Map<String, String> conf, Binder binder);  }### Answer:
@Test public void testFunctions() { StatefulFunctionModule module = fromPath(modulePath); StatefulFunctionsUniverse universe = emptyUniverse(); module.configure(Collections.emptyMap(), universe); assertThat( universe.functions(), allOf( hasKey(new FunctionType("com.example", "hello")), hasKey(new FunctionType("com.foo", "world")), hasKey(new FunctionType("com.bar", "world")))); }
@Test public void testRouters() { StatefulFunctionModule module = fromPath(modulePath); StatefulFunctionsUniverse universe = emptyUniverse(); module.configure(Collections.emptyMap(), universe); assertThat( universe.routers(), hasKey(new IngressIdentifier<>(Message.class, "com.mycomp.igal", "names"))); }
@Test public void testIngresses() { StatefulFunctionModule module = fromPath(modulePath); StatefulFunctionsUniverse universe = emptyUniverse(); module.configure(Collections.emptyMap(), universe); assertThat( universe.ingress(), hasKey(new IngressIdentifier<>(Message.class, "com.mycomp.igal", "names"))); }
@Test public void testEgresses() { StatefulFunctionModule module = fromPath(modulePath); StatefulFunctionsUniverse universe = emptyUniverse(); module.configure(Collections.emptyMap(), universe); assertThat( universe.egress(), hasKey(new EgressIdentifier<>("com.mycomp.foo", "bar", Any.class))); }