}
public void testComplexReferenced() throws Exception {
SchemaElement root = runNoErrors(REFERENCE_SCHEMA);
if (!hasProblem(m_validationContext)) {
UsageFinder usage = new UsageFinder();
usage.countSchemaTree(root);
ReferenceCountMap map = usage.getUsageMap();
checkTypeUsage("simple1", map, 1);
checkElementUsage("simple1", map, 1);
checkTypeUsage("simple2", map, 0);
checkTypeUsage("simple3", map, 0);
checkTypeUsage("rating", map, 3);