### Question:
CollectionType extends ClassType { @Override public String toSchema() { return COLLECTION_COMPLEX_TYPE_SCHEMA .replace("???type???", elementsQName.getLocalPart()) .replace("???name???", elementsQName.getLocalPart()) .replace("???collectionType???", qName.getLocalPart()) .replace("???collectionName???", qName.getLocalPart()); } CollectionType(Class<?> collectionClass, QName collectionQName, QName elementsQName); @Override String toSchema(); QName getElementsQName();  }### Answer:
@Test public void givenNameOfComplexTypeCollection_whenBuild_thenReturnSchemaWithTheCollection() { assertThat(new CollectionType(ContactAnnotated[].class, new QName("contactAnnotatedCollection"), new QName("contactAnnotated")).toSchema(), is(ContactAnnotated.EXPECTED_COLLECTION_SCHEMA)); }