### Question:
Spec { public String getOutput() { return output; } Spec(); String getName(); Spec setName(String name); Map<String, DeclaredType> getTypes(); Map<String, Input> getInputs(); List<Rule> getRules(); Spec setRules(List<Rule> rules); String getOutput(); void setOutput(String output); void validateType(String type); boolean isValidType(String type); boolean mustParse(String input, String field); static final String FIELD_NAME; static final String FIELD_TYPES; static final String FIELD_INPUTS; static final String FIELD_RULES; static final String FIELD_OUTPUT; }### Answer:
@Test public void testOutputComplexType() throws IOException { JsonObject json = Json.createObjectBuilder() .add(Spec.FIELD_INPUTS, Json.createArrayBuilder()) .add(Spec.FIELD_TYPES, buildTypes()) .add(Spec.FIELD_RULES, Json.createArrayBuilder()) .add(Spec.FIELD_OUTPUT, "Person") .build(); Spec spec = parseSpec(json); assertEquals("Person", spec.getOutput()); }