@Test public void testUpdate() { int updates = 0; boolean isUpdated = false; Menu menu = new Menu(); menu.setID_MENU(1); menu.setNM_MENU("About1"); try { updates = menuDAO.update(menu); isUpdated = updates > 0 ? true : false; } catch (DataAccessException e) { e.printStackTrace(); } finally { assertEquals( "The result for the operation testUpdate [" + isUpdated + "] " + "is different of the expected [" + SUCCESS_OPERATION + "].", SUCCESS_OPERATION, isUpdated); } }