@Test public void gettingNonExistingTerminalShouldFail() { final String path = "patch.value.typed_config.value.root_id"; try { assertEquals("stats_outbound", StructHelper.get(map, path, String.class)); fail("Should have thrown an IllegalArgumentException"); } catch (IllegalArgumentException e) { final String message = e.getMessage(); assertEquals("'root_id' is not a child of 'patch.value.typed_config.value'. Known children: " + "'config'", message); } }
public static <T> T get(Map<String, Object> struct, String dotSeparatedPath, Class<T> expectedType) { final String[] parts = dotSeparatedPath.split("\\."); return get(struct, parts, expectedType, new LinkedList<>(), dotSeparatedPath); }
StructHelper { public static <T> T get(Map<String, Object> struct, String dotSeparatedPath, Class<T> expectedType) { final String[] parts = dotSeparatedPath.split("\\."); return get(struct, parts, expectedType, new LinkedList<>(), dotSeparatedPath); } }
StructHelper { public static <T> T get(Map<String, Object> struct, String dotSeparatedPath, Class<T> expectedType) { final String[] parts = dotSeparatedPath.split("\\."); return get(struct, parts, expectedType, new LinkedList<>(), dotSeparatedPath); }  }
StructHelper { public static <T> T get(Map<String, Object> struct, String dotSeparatedPath, Class<T> expectedType) { final String[] parts = dotSeparatedPath.split("\\."); return get(struct, parts, expectedType, new LinkedList<>(), dotSeparatedPath); }  static T get(Map<String, Object> struct, String dotSeparatedPath, Class<T> expectedType); }
StructHelper { public static <T> T get(Map<String, Object> struct, String dotSeparatedPath, Class<T> expectedType) { final String[] parts = dotSeparatedPath.split("\\."); return get(struct, parts, expectedType, new LinkedList<>(), dotSeparatedPath); }  static T get(Map<String, Object> struct, String dotSeparatedPath, Class<T> expectedType);  }