@Test
public void testDeleteOwner() throws Exception {

	File file = fileService.createFile("f1", "jpg", "f1", 99);
	file = fileService.addOwners(file.getId(), new Owner[] { new Owner(new User("i1")) });
	file = fileService.addOwners(file.getId(), new Owner[] { new Owner(new User("i2")) });
	assertEquals(3, fileService.getFile(file.getId()).getOwners().size());
	fileService.deleteOwner(file.getId(), file.getOwners().get(1).getId());
	assertEquals(2, fileService.getFile(file.getId()).getOwners().size());
	assertEquals("i2", fileService.getFile(file.getId()).getOwners().get(1).getUser().getUserId());
}