### Question:
DataAccessSampleLogic { public void insertData() { Connection con = null; Statement stmt = null; try { con = ds.getConnection(); stmt = con.createStatement(); int count = sampleLogic.plus(1, 5); for (int i = 0; i < count; i++) { stmt.executeUpdate("INSERT INTO EMP (id, name) values (" + i + ", 'test')"); } } catch (Exception e) { throw new RuntimeException(e); } finally { try { if (stmt != null) { stmt.close(); } if (con != null) { con.close(); } } catch (Exception ex) { throw new RuntimeException(ex); } } }  List<EmpDto> getEmpAllRecord(); void insertData(); public DataSource ds; public SampleLogic sampleLogic; }### Answer:
@Mock(target = SampleLogic.class, pointcut = "plus", returnValue = "new Integer(10)") @Test public void testInsertData() throws Exception { target.insertData(); DataTable actual = dataAccessor.readDbByTable("emp"); DataSet expected = testContext.getExpected(); assertEquals(expected.getTable("emp"), actual); }