@Test
public void testFromJsonArray() {

    final Rule allowsDigits = Rules.fromJson(key(Rule.keys().type(), "ALLOW")
            .key(Rule.keys().pattern(), "[0-9]*").get());
    final Rule allowsLetters = Rules.fromJson(key(Rule.keys().type(), "ALLOW")
            .key(Rule.keys().pattern(), "[a-z]*").get());
    final List<Rule> expectRules = Arrays.asList(allowsDigits, allowsLetters);
    assertEquals("exect same rules", expectRules, Rules.fromJsonArray(arr()
            .val(key(Rule.keys().type(), "allow").key(Rule.keys().pattern(), "[0-9]*"))
            .val(key(Rule.keys().type(), "allow").key(Rule.keys().pattern(), "[a-z]*"))
            .get()));
}