PeppolSBDHPayloadReader extends JAXBReaderBuilder <JAXBTYPE, PeppolSBDHPayloadReader <JAXBTYPE>> { @Nonnull public static PeppolSBDHPayloadReader <TextContentType> textContent () { return new PeppolSBDHPayloadReader <> (EPeppolSBDHPayloadType.TEXT, TextContentType.class); } PeppolSBDHPayloadReader(@Nonnull final EPeppolSBDHPayloadType eDocType, @Nonnull final Class <JAXBTYPE> aImplClass); @Nonnull static PeppolSBDHPayloadReader <BinaryContentType> binaryContent(); @Nonnull static PeppolSBDHPayloadReader <TextContentType> textContent();  }
@Test public void testText () { TextContentType aCT = PeppolSBDHPayloadReader.textContent () .read ("<TextContent xmlns='http: assertNotNull (aCT); assertEquals ("bla/foo", aCT.getMimeType ()); assertEquals ("Payload", aCT.getValue ()); aCT = PeppolSBDHPayloadReader.textContent ().read ("<TextContent xmlns='http: assertNotNull (aCT); assertEquals ("bla/foo", aCT.getMimeType ()); assertEquals ("", aCT.getValue ()); aCT = PeppolSBDHPayloadReader.textContent () .read ("<TextContent xmlns='http: assertNotNull (aCT); assertEquals ("bla/foo", aCT.getMimeType ()); assertEquals ("", aCT.getValue ()); assertNull (PeppolSBDHPayloadReader.textContent () .read ("<TextContent xmlns='ttp: assertNull (PeppolSBDHPayloadReader.textContent () .read ("<TextContent2 xmlns='http: assertNull (PeppolSBDHPayloadReader.textContent () .read ("<TextContent xmlns='http: }