List<ChildAssociationRef> refs = nodeService.getChildAssocsByPropertyValue(parentNodeRef, ContentModel.PROP_SUBJECT, subject);
assertTrue("failed to read one assoc", refs.size() == 1);
assertTrue("content not correct", refs.contains(n1Ref));
refs = nodeService.getChildAssocsByPropertyValue(parentNodeRef, ContentModel.PROP_SUBJECT, subject);
assertTrue("failed to read two assocs", refs.size() == 2);
assertTrue("content not correct", refs.contains(n1Ref));
List<ChildAssociationRef> refs = nodeService.getChildAssocsByPropertyValue(parentNodeRef, ContentModel.PROP_COUNTER, count);
assertTrue("failed to read one assoc", refs.size() == 1);
assertTrue("content not correct", refs.contains(n1Ref));
Double alfLon = new Double(0.43);
nodeService.setProperty(n1Ref.getChildRef(), ContentModel.PROP_LATITUDE, alfLat);
refs = nodeService.getChildAssocsByPropertyValue(parentNodeRef, ContentModel.PROP_LATITUDE, alfLat);
assertTrue("failed to read one assoc", refs.size() == 1);
assertTrue("content not correct", refs.contains(n1Ref));
nodeService.setProperty(n1Ref.getChildRef(), ContentModel.PROP_ENABLED, beauty);
assertTrue((Boolean)nodeService.getProperty(n1Ref.getChildRef(), ContentModel.PROP_ENABLED));
refs = nodeService.getChildAssocsByPropertyValue(parentNodeRef, ContentModel.PROP_ENABLED, beauty);
assertTrue("failed to read one assoc", refs.size() == 1);
assertTrue("content not correct", refs.contains(n1Ref));
nodeService.setProperty(n1Ref.getChildRef(), ContentModel.PROP_ENABLED, beauty);
assertTrue(!(Boolean)nodeService.getProperty(n1Ref.getChildRef(), ContentModel.PROP_ENABLED));
refs = nodeService.getChildAssocsByPropertyValue(parentNodeRef, ContentModel.PROP_ENABLED, beauty);
assertTrue("failed to read one assoc", refs.size() == 1);