{
final Document document = factory.newDocumentBuilder().parse(new ByteArrayInputStream(descriptor.getBytes()));
final NodeList persistenceUnits = document.getElementsByTagName("persistence-unit");
if (persistenceUnits.getLength() > 1)
{
throw new MultiplePersistenceUnitsException("Multiple persistence units defined. Please specify default data source either in 'arquillian.xml' or by using @DataSource annotation");
}
final Node persistenceUnit = persistenceUnits.item(0);
Node dataSource = getJtaDataSource(persistenceUnit);
if (dataSource == null)
{