assertEquals("GET", petLink.getMethod());
assertEquals(petSchema, petLink.getTargetSchema());
}
public void testSimpleHyperWithoutDefaultSchema() throws Exception {
HyperSchemaFactoryWrapper personVisitor = new HyperSchemaFactoryWrapper();
ObjectMapper mapper = new ObjectMapper();
mapper.acceptJsonFormatVisitor(Person.class, personVisitor);
JsonSchema personSchema = personVisitor.finalSchema();
HyperSchemaFactoryWrapper petVisitor = new HyperSchemaFactoryWrapper();
mapper.acceptJsonFormatVisitor(Pet.class, petVisitor);
JsonSchema petSchema = petVisitor.finalSchema();
assertTrue("schema should be an objectSchema.", personSchema.isObjectSchema());
LinkDescriptionObject[] links = personSchema.asObjectSchema().getLinks();
assertNotNull(links);
assertEquals(links.length, 2);