public Map<String, Object> asMap() {
      return Collections.singletonMap(lines.parsed.name, asMap(lines));
   }
@Test
   public void testYamlMapper() throws IOException {
      URL url = YamlConfigurationReaderTest.class.getResource("/identities.yaml");
      try (Reader r = new InputStreamReader(url.openStream())) {
         YamlConfigurationReader yaml = new YamlConfigurationReader(r, new URLConfigurationResourceResolver(url), new Properties(), PropertyReplacer.DEFAULT, NamingStrategy.KEBAB_CASE);
         Map<String, Object> identities = yaml.asMap();
         assertEquals(1, identities.size());
         List<Object> credentials = (List<Object>) identities.get("credentials");
         assertNotNull(credentials);
         assertEquals(3, credentials.size());
                  for (Object o : credentials) {
            Map<String, Object> credential = (Map<String, Object>) o;
            assertTrue(credential.containsKey("username"));
            assertTrue(credential.containsKey("password"));
            assertEquals("changeme", credential.get("password"));
            if ("my-user-1".equals(credential.get("username"))) {
               assertTrue(credential.containsKey("roles"));
               assertEquals(Collections.singletonList("admin"), credential.get("roles"));
            } else if ("my-user-2".equals(credential.get("username"))) {
               assertTrue(credential.containsKey("roles"));
               assertEquals(Arrays.asList("monitor", "writer"), credential.get("roles"));
            } else {
               assertEquals("admin", credential.get("username"));
               assertFalse(credential.containsKey("roles"));
            }
         }
      }
   }