}
static void assertLayer(Resource root, List<String> types, int depth) {
for (Resource child : root.getChildren()) {
final ModifiableValueMap m = child.adaptTo(ModifiableValueMap.class);
if (m.keySet().contains(MessageStoreImplRepositoryTest.TEST_RT_KEY)) {
String type = m.get(MessageStoreImplRepositoryTest.TEST_RT_KEY, String.class);
assertEquals(String.format("Expecting %s to have %s type", child.getPath(), types.get(depth)), types.get(depth), type);
}
if (child.getChildren().iterator().hasNext()) {
assertLayer(child, types, depth+1);