@BeforeClass public static void setUp() throws Exception { // the first three notes are known final NotesDAO notesDAO = NotesDAO.getInstance(); notesDAO.clearNotes(); Note note = new Note(); note.setBody(TEST_BODY + '1'); notesDAO.addNote(note); note = new Note(); note.setBody(TEST_BODY + '2'); notesDAO.addNote(note); note = new Note(); note.setBody(TEST_BODY + '3'); notesDAO.addNote(note); // start the server server = Main.startServer(); // create the client Client c = ClientBuilder.newClient(); target = c.target(Main.BASE_URI); }
@AfterClass public static void tearDown() throws Exception { NotesDAO.getInstance().clearNotes(); server.shutdown(); }