code: @SuppressWarnings("unchecked")
      public static <T> T unmarshal(final JAXBContext ctx, final Reader reader, final XmlAdapter<?, ?>[] adapters) {
  
          try {
              final Unmarshaller unmarshaller = ctx.createUnmarshaller();
              if (adapters != null) {
                  for (final XmlAdapter<?, ?> adapter : adapters) {
                      unmarshaller.setAdapter(adapter);
                  }
              }
              unmarshaller.setEventHandler(new ValidationEventHandler() {
                  @Override
                  public boolean handleEvent(final ValidationEvent event) {
                      if (event.getSeverity() > 0) {
                          final Throwable ex = event.getLinkedException();
                          if (ex == null) {
                              throw new RuntimeException("Error unmarshalling the data: " + event.getMessage());
                          }
                          throw new RuntimeException("Error unmarshalling the data", ex);
                      }
                      return true;
                  }
              });
              return (T) unmarshaller.unmarshal(reader);
          } catch (final JAXBException ex) {
              throw new RuntimeException("Error unmarshalling test data", ex);
          }
  
      }
docs: Unmarshals the given data using a given context. A <code>null</code> XML data argument returns <code>null</code>.
  
  @param ctx
  Context to use - Cannot be <code>null</code>.
  @param reader
  Reader with XML data.
  @param adapters
  Adapters to associate with the unmarshaller or <code>null</code>.
  
  @return Data or <code>null</code>.
  
  @param <T>
  Type of the expected data.