@Test
public void addParticipantWithRole() throws WookieConnectorException, IOException{
HashMap<String, Widget> widgets = service.getAvailableWidgets();
WidgetInstance instance = service.getOrCreateInstance((Widget)widgets.values().toArray()[0]);
assertNotNull("Retrieved widget instance is null", instance);
User user = new User("roletestuser","role test user","http://bar.com/icon.png","OWNER");
service.addParticipant(instance, user);
User[] users = service.getUsers(instance);
user = users[users.length-1];
assertTrue("Incorrect user", user.getLoginName().equals("roletestuser"));
assertTrue("Incorrect role", user.getRole().equals("OWNER"));
service.removeParticipantFromWidget(instance, user);
}