void () { assertNull(getFacetManager().getFacetByType(MockSubFacetType.ID)); assertNull(getFacetManager().getFacetByType(MockFacetType.ID)); ModifiableFacetModel model = getFacetManager().createModifiableModel(); MockFacet mockFacet = new MockFacet(myModule, "mock"); model.addFacet(mockFacet); Facet subFacet = MockSubFacetType.getInstance().createFacet(myModule, "mock", new MockFacetConfiguration(), mockFacet); model.addFacet(subFacet); commit(model); assertSame(subFacet, getFacetManager().getFacetByType(mockFacet, MockSubFacetType.ID)); assertSame(mockFacet, getFacetManager().getFacetByType(MockFacetType.ID)); assertNull(getFacetManager().getFacetByType(mockFacet, MockFacetType.ID)); model = getFacetManager().createModifiableModel(); model.removeFacet(subFacet); model.removeFacet(mockFacet); commit(model); assertNull(getFacetManager().getFacetByType(MockSubFacetType.ID)); assertNull(getFacetManager().getFacetByType(MockFacetType.ID)); }