@DELETE @Transactional public Response deleteLink( @Context Credentials credentials, @PathParam("user_id") String userId, @PathParam("name") String name, @PathParam("reader_id") String readerId) { final Session session = credentials.buildSession(userDAO, userId); final User reader = findUser(readerId); final Document doc = findDocument(session.getUser(), name); doc.unlinkUser(reader); reEncrypt(doc, session.getKeySet()); documentDAO.saveOrUpdate(doc); return Response.noContent().build(); }
@Test public void itHasAPassword() throws Exception { assertThat(creds.getPassword()).isEqualTo("hah"); }
@Test public void itHasAUsername() throws Exception { assertThat(creds.getUsername()).isEqualTo("woo"); }