@Test
public void testDefaultResourceShapeForNestedResource() throws Exception {
// given
ResourceShape resourceShape = ResourceShapeFactory.createResourceShape(TestResource.class, null);
Property[] properties = resourceShape.getProperties();
Property resourceProperty = getPropertyWithName(properties, TestResource.RESOURCE_PROPERTY_NAME);
// when
ResourceShape nestedResourceShape = resourceProperty.getResourceShape();
// then
Property[] nestedProperties = nestedResourceShape.getProperties();
assertEquals(1, nestedProperties.length);
assertHasProperty(nestedProperties, TestResource.LOCATION_PROPERTY);