}
}
@Test
public void test(){
DBRecord dep = new DBRecord();
dep.create(db.DEPARTMENT);
dep.setValue(db.DEPARTMENT.NAME, "junit");
dep.setValue(db.DEPARTMENT.BUSINESS_UNIT, "testers");
dep.update(conn);
Date date = dep.getDateTime(db.DEPARTMENT.UPDATE_TIMESTAMP);
assertNotNull("Date is null", date);
assertTrue("No departments", dep.getInt(db.DEPARTMENT.ID) > 0);
DBRecord emp = new DBRecord();
emp.create(db.EMPLOYEE);
emp.setValue(db.EMPLOYEE.FIRSTNAME, "junit");
emp.setValue(db.EMPLOYEE.LASTNAME, "test");
emp.setValue(db.EMPLOYEE.GENDER, "m");
emp.setValue(db.EMPLOYEE.DEPARTMENT_ID, dep.getInt(db.DEPARTMENT.ID));
emp.update(conn);
date = emp.getDateTime(db.EMPLOYEE.UPDATE_TIMESTAMP);
assertNotNull("Date is null", date);
assertTrue("Employee id O or less", emp.getInt(db.EMPLOYEE.ID) > 0);
int id = emp.getInt(db.EMPLOYEE.ID);
// Update an Employee
emp = new DBRecord();
emp.read(db.EMPLOYEE, id, conn);
// Set
emp.setValue(db.EMPLOYEE.PHONE_NUMBER, "123456");
emp.update(conn);
emp = new DBRecord();
emp.read(db.EMPLOYEE, id, conn);
assertEquals("123456", emp.getString(db.EMPLOYEE.PHONE_NUMBER));
}