// node type with default child-node type of to nt:base
String ntName = "binaryCoercionTest";
NodeTypeManager ntm = session.getWorkspace().getNodeTypeManager();
NodeTypeTemplate ntt = ntm.createNodeTypeTemplate();
ntt.setName(ntName);
PropertyDefinitionTemplate propertyWithType = ntm.createPropertyDefinitionTemplate();
propertyWithType.setName("javaObject");
propertyWithType.setRequiredType(PropertyType.STRING);
PropertyDefinitionTemplate unnamed = ntm.createPropertyDefinitionTemplate();
unnamed.setName("*");
unnamed.setRequiredType(PropertyType.UNDEFINED);
List<PropertyDefinition> properties = ntt.getPropertyDefinitionTemplates();
properties.add(propertyWithType);
properties.add(unnamed);
ntm.registerNodeType(ntt, false);