Map<String, DataSource> dataSources = new HashMap<String, DataSource>();
dataSources.put("jdbc/MyPartDB", ds);
dataSources.put("jdbc/MyDB", ds);
dataSourceLookup.setDataSources(dataSources);
PersistenceUnitReader reader = new PersistenceUnitReader(
new PathMatchingResourcePatternResolver(), dataSourceLookup);
PersistenceUnitInfo[] info = reader.readPersistenceUnitInfos(resource);
assertEquals(2, info.length);
PersistenceUnitInfo pu1 = info[0];