@SuppressWarnings("unchecked")
  public void testGetProjectCollaborators() {

    UserDao udao = new UserDao();
    User collab = udao._get(TEST_USERNAME + ".collab");
    if (collab == null) {
      collab = createUser();
      collab.setUsername(TEST_USERNAME + ".collab");
      udao._add(collab);
    }

    UserProject collabup = new UserProject(collab, project);
    collabup.setUserType(UserPermissionType.USER);
    collabup.setUsage(new Usage());
    collabup.setMss(new ResourceDao(session)._getStorage(TEST_STORAGENAME));
    UserProjectDao.add(collabup);

    String sCollabs = service.getCollaborators(TEST_SESSIONTOKEN);
    assertNotNull(sCollabs);

    List<UserBean> beans = (List<UserBean>) ServiceUtil.xstream.fromXML(sCollabs);

    assertTrue(beans.size() == 2);

    UserProjectDao.remove(collabup);

    udao = new UserDao();
    udao._remove(collab);
  }
 public void testGetProjectCollaboratorsInvalidSessionToken() throws Exception {
   try {
     service.getCollaborators("-1");
     fail("Invalid session token should throw session exception");
   } catch (SessionException e) {
   } catch (Exception e) {
     fail("Invalid session token should throw session exception");
   }
 }
 public void testGetProjectCollaboratorsNullSessionToken() throws Exception {
   try {
     service.getCollaborators(null);
     fail("Null session token should throw session exception");
   } catch (SessionException e) {
   } catch (Exception e) {
     fail("Null session token should throw session exception");
   }
 }