void () { doDetect(); final List<MockFacet> facets = new ArrayList<>(getFacets()); assertEquals(2, facets.size()); assertNotEquals(facets.get(0).getName(), facets.get(1).getName()); final Facet<?> subFacet = assertOneElement(FacetManager.getInstance(myModule).getFacetsByType(MockSubFacetType.ID)); final Facet<?> parentFacet = subFacet.getUnderlyingFacet(); assertNotNull(parentFacet); assertTrue(facets.contains(parentFacet)); assertEquals("sub-my-config2.xml", ((MockFacetConfiguration)subFacet.getConfiguration()).getData()); }