130131132133134135136137138139140
String projectId = "proj1"; Project p = new Project("wpisuite", projectId); try { projects.makeEntity(originalSession, p.toJSON()); } catch(ConflictException e) { // this is okay because it means the project already exists in the database. }
148149150151152153154155156157158
assertTrue(originalSession.getProject() == null); assertTrue(projectSession.getProject().equals(p)); try { projects.deleteEntity(projectSession, p.toJSON()); } catch(NotFoundException e) { // this is okay since we are trying to make the project 'not found' }