private static void parseAliases(JsonNode schema, Schema result) {
    Set<String> aliases = parseAliases(schema);
    if (aliases != null) // add aliases
      for (String alias : aliases)
        result.addAlias(alias);
  }
@Test
  public void parseAliases() throws JsonProcessingException {
    String s1 = "{ \"aliases\" : [\"a1\",  \"b1\"]}";
    ObjectMapper mapper = new ObjectMapper();
    JsonNode j1 = mapper.readTree(s1);
    Set<String> aliases = Schema.parseAliases(j1);
    assertEquals(2, aliases.size());
    assertTrue(aliases.contains("a1"));
    assertTrue(aliases.contains("b1"));

    String s2 = "{ \"aliases\" : {\"a1\": \"b1\"}}";
    JsonNode j2 = mapper.readTree(s2);

    SchemaParseException ex = assertThrows(SchemaParseException.class, () -> Schema.parseAliases(j2));
    assertTrue(ex.getMessage().contains("aliases not an array"));

    String s3 = "{ \"aliases\" : [11,  \"b1\"]}";
    JsonNode j3 = mapper.readTree(s3);
    SchemaParseException ex3 = assertThrows(SchemaParseException.class, () -> Schema.parseAliases(j3));
    assertTrue(ex3.getMessage().contains("alias not a string"));
  }