CastFunction implements MapFunction<UntypedValues, TypedValues> { @Override public TypedValues map(UntypedValues untypedValues) { return untypedValues.toTypedValues(); }  @Override TypedValues map(UntypedValues untypedValues);  }
@Test public void map() { long timestamp = Instant.now().toEpochMilli(); Map<String, Object> map = new HashMap<>(); map.put("0", Boolean.FALSE); map.put("1", Date.from(Instant.ofEpochMilli(timestamp))); map.put("2", 2.0); map.put("3", 3L); map.put("4", "4"); UntypedValues untypedValues = new UntypedValues("source", timestamp, "testPlc", map); TypedValues typedValues = castFunction.map(untypedValues); assertNotNull(typedValues); assertEquals(untypedValues.getSource(), typedValues.getSource()); assertEquals(untypedValues.getTimestamp(), typedValues.getTimestamp()); }