@Test
public void testBuilderWithNodetypes() {

    final List<JcrNs> jcrNamespaces = Arrays.asList(
            JcrNs.create("foo", "http://foo.com"),
            JcrNs.create("bar", "http://bar.com"));
    Checklist.Builder builderWithNodetypes = new Checklist.Builder("test");
    final NamespaceMapping mapping = JsonCnd.toNamespaceMapping(jcrNamespaces);
    final List<QNodeTypeDefinition> nodetypes = JsonCnd.getQTypesFromJson(obj()
            .key("foo:primaryType").val(key("extends", arr().val("nt:base")))
            .key("foo:mixinType").val(key("@", arr().val("mixin")))
            .key("bar:primaryType").val(key("extends", arr().val("nt:base")))
            .key("bar:mixinType").val(key("@", arr().val("mixin"))).get(), mapping);
    builderWithNodetypes.withJcrNodetypes(nodetypes);
    assertEquals("jcr nodetypes pass thru",
            nodetypes, builderWithNodetypes.build().getJcrNodetypes());
}