public void testGetProjects() throws Exception {
User mockUser = UserImpl.create("mock", P2PTransport.CODE);
assertEquals("Sanity check", 0, myTransport.getProjects(mockUser).length);
Vector<String> projects = new Vector<String>(Arrays.asList("project1", "project2"));
new AddOnlineUserP2PCommand(myTransport.getUserMonitorThread())
.addOnlineUser("localhost", "mock", 0, projects, null);
myTransport.flushCurrentUsers();
assertEquals("Projects should be set from available online user",
projects.toString(), Arrays.asList(myTransport.getProjects(mockUser)).toString());