log("Test skipped. Required repository class: "
+ RepositoryImpl.class + " got: " + rep.getClass());
return;
}
RepositoryImpl r = (RepositoryImpl) rep;
RepositoryConfig conf = r.getConfig();
Collection<WorkspaceConfig> coll = conf.getWorkspaceConfigs();
String[] names = new String[coll.size()];
Iterator<WorkspaceConfig> wspIt = coll.iterator();
for (int i = 0; wspIt.hasNext(); i++) {
WorkspaceConfig wsc = (WorkspaceConfig) wspIt.next();
names[i] = wsc.getName();
}
for (int i = 0; i < names.length && i < 1; i++) {
Session s = getHelper().getSuperuserSession(names[i]);
try {
Method m = r.getClass().getDeclaredMethod("getWorkspaceInfo", new Class[] { String.class });
m.setAccessible(true);
Object info = m.invoke(r, names[i]);
m = info.getClass().getDeclaredMethod("getPersistenceManager", new Class[0]);
m.setAccessible(true);
PersistenceManager pm = (PersistenceManager) m.invoke(info, new Object[0]);