private void testWorkspace(List<AppWorkspace> workspaces, String collectionHref, String[] expectedTerms) {
        List<String> expectedTermsList = Arrays.asList(expectedTerms);
        for (AppWorkspace workspace : workspaces) {
            for (AppCollection collection : workspace.getCollection()) {
                if (collection.getHref().contains(collectionHref)) {
                    for (AppCategories categories : collection.getCategories()) {
                        int count = 0;
                        for (Category category : categories.getCategory()) {
                            // Note: Since specific titles, etc. aren't required by the spec, testing against the category
                            // schemes and terms is the only option.
                            assertEquals("urn:x-s-ramp:2013:type", category.getScheme().toString());
                            if (expectedTermsList.contains(category.getTerm())) {
                                count++;
                            }
                        }
                        if (count == expectedTerms.length) {
                            // found them all -- simply return
                            return;
                        }
                    }
                }
            }
        }
        fail("Either failed to find the " + collectionHref + " workspace, or the workspace did not contain the expected terms");
    }