public Reference getTestFolder() throws RepositoryFault, RemoteException{
WebServiceFactory.setTimeoutMilliseconds(SOCKET_TIMEOUT);
WebServiceFactory.setEndpointAddress(ALFRESCO_ENDPOINT_TEST_SERVER);
AuthenticationUtils.startSession(ALFRESCO_USERNAME, ALFRESCO_PASSWORD);
Reference reference = new Reference();
try{
RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();
Query query = new Query(Constants.QUERY_LANG_LUCENE, ALFRESCO_TEST_QUERY);
QueryResult queryResult = repositoryService.query(STORE, query, false);
ResultSetRow row = queryResult.getResultSet().getRows(0);
reference.setStore(STORE);
reference.setUuid(row.getNode().getId());
return reference;
} finally {
AuthenticationUtils.endSession();
}
}