@Test
public void buildsMarshallerWithFragmentProperty() throws Exception {

  JAXBContextFactory factory =
      new JAXBContextFactory.Builder().withMarshallerFragment(true).build();
  Marshaller marshaller = factory.createMarshaller(Object.class);
  assertTrue((Boolean) marshaller.getProperty(Marshaller.JAXB_FRAGMENT));
}