public Unmarshaller createUnmarshaller(Class<?> clazz) throws JAXBException {
    Unmarshaller unmarshaller = getContext(clazz).createUnmarshaller();
    if (unmarshallerEventHandler != null) {
      unmarshaller.setEventHandler(unmarshallerEventHandler);
    }
    unmarshaller.setSchema(unmashallerSchema);
    return unmarshaller;
  }
@Test
  void buildsUnmarshallerWithSchema() throws Exception {
    Schema schema = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema();
    JAXBContextFactory factory =
        new JAXBContextFactory.Builder().withUnmarshallerSchema(schema).build();

    Unmarshaller unmarshaller = factory.createUnmarshaller(Object.class);
    assertThat(unmarshaller.getSchema()).isSameAs(schema);
  }