@AfterClass public static void tearDownClass() throws Exception { Income income = null; Object[][] temp = icInst.getIncomes(); if (temp != null && temp.length > 0) { for (int i = 0; i < temp.length; i++) { if (temp[i][2].equals("testName") && temp[i][6].equals("testUsername") && temp[i][7].equals("testNote")) { income = icInst.getIncomeByID(Integer.parseInt(temp[i][0].toString())); } } } if (income != null) income.delete(); if (user != null) user.delete(); if (material != null) material.delete(); if (materialType != null) materialType.delete(); }