assertTrue("schema should be an objectSchema.", personSchema.isObjectSchema());
LinkDescriptionObject[] links = personSchema.asObjectSchema().getLinks();
assertNotNull(links);
assertEquals(links.length, 2);
LinkDescriptionObject selfLink = links[0];
assertEquals("/persons/{name}", selfLink.getHref());
assertEquals("self", selfLink.getRel());
assertEquals("application/json", selfLink.getEnctype());
assertEquals("GET", selfLink.getMethod());
LinkDescriptionObject petLink = links[1];
assertEquals("/persons/{name}/pet", petLink.getHref());
assertEquals("pet", petLink.getRel());
assertEquals("application/json", petLink.getEnctype());
assertEquals("GET", petLink.getMethod());
assertEquals(petSchema, petLink.getTargetSchema());
}