@Test
public void updatesMetadataReferences() {

    Model model = Model.assembler()
            .addImport(IntegTest.class.getResource("rename-shape-test-model.json"))
            .assemble()
            .unwrap();
    Map<ShapeId, ShapeId> renamed = new HashMap<>();
    ShapeId fooUnreferenced = ShapeId.from("ns.foo#UnreferencedString");
    ShapeId barUnreferenced = ShapeId.from("ns.bar#UnreferencedString");
    renamed.put(fooUnreferenced, barUnreferenced);
    ModelTransformer transformer = ModelTransformer.create();
    Model result = transformer.renameShapes(model, renamed);
    assertTrue(result.getShape(barUnreferenced).isPresent());
    assertFalse(result.getShape(fooUnreferenced).isPresent());
}