@Test @Parameters({ "schemas/urn:ietf:params:scim:schemas:core:2.0:User.json", "schemas/urn:ietf:params:scim:schemas:core:2.0:Group.json", "schemas/urn:ietf:params:scim:schemas:core:2.0:ResourceType.json", "schemas/urn:ietf:params:scim:schemas:core:2.0:Schema.json", "schemas/urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig.json", "schemas/urn:ietf:params:scim:schemas:extension:enterprise:2.0:User.json" }) public void testUnmarshallingProvidedSchemas(String schemaFileName) { ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); InputStream inputStream = classLoader.getResourceAsStream(schemaFileName); ObjectMapper objectMapper = new ObjectMapper(); JaxbAnnotationModule jaxbAnnotationModule = new JaxbAnnotationModule(); objectMapper.registerModule(jaxbAnnotationModule); AnnotationIntrospector jaxbAnnotationIntrospector = new JaxbAnnotationIntrospector(objectMapper.getTypeFactory()); objectMapper.setAnnotationIntrospector(jaxbAnnotationIntrospector); Schema schema = null; try { schema = objectMapper.readValue(inputStream, Schema.class); assertNotNull(schema); } catch (Throwable t) { fail("Unexpected Throwable was caught while unmarshalling JSON: " + t.getLocalizedMessage()); } if (schema != null) { Set<ConstraintViolation<Schema>> schemaViolations = validator.validate(schema); assertTrue(schemaViolations.isEmpty()); for (Attribute attribute : schema.getAttributes()) { Set<ConstraintViolation<Attribute>> attributeViolations = validator.validate(attribute); assertTrue(attributeViolations.isEmpty()); } Meta meta = schema.getMeta(); if (meta != null) { Set<ConstraintViolation<Meta>> metaViolations = validator.validate(meta); assertTrue(metaViolations.isEmpty()); } } }
public List<Attribute> getAttributes() { return Collections.unmodifiableList(attributes); }
Schema implements AttributeContainer { public List<Attribute> getAttributes() { return Collections.unmodifiableList(attributes); } }
Schema implements AttributeContainer { public List<Attribute> getAttributes() { return Collections.unmodifiableList(attributes); }  }
Schema implements AttributeContainer { public List<Attribute> getAttributes() { return Collections.unmodifiableList(attributes); }  List<Attribute> getAttributes(); void setAttributes(List<Attribute> attributes); Attribute getAttribute(String name); }
Schema implements AttributeContainer { public List<Attribute> getAttributes() { return Collections.unmodifiableList(attributes); }  List<Attribute> getAttributes(); void setAttributes(List<Attribute> attributes); Attribute getAttribute(String name); static final String RESOURCE_NAME; static final String SCHEMA_URI; }