Prelude { static Model getPreludeModel() { return PreludeHolder.PRELUDE; } private  Prelude(); static boolean isPreludeShape(ToShapeId id); static boolean isPublicPreludeShape(ToShapeId id); static final String NAMESPACE; }
@Test public void checkIfPrivateShapesAreReferenced() { Model model = Prelude.getPreludeModel(); ModelTransformer transformer = ModelTransformer.create(); Model result = transformer.scrubTraitDefinitions(model); Set<ShapeId> unreferencedPrivateShapes = result.shapes() .filter(shape -> shape.hasTrait(PrivateTrait.class)) .map(Shape::getId) .collect(Collectors.toSet()); assertThat(unreferencedPrivateShapes, emptyCollectionOf(ShapeId.class)); }