### Question:
BaseDaoEnabled { public int create() throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.create(t); }  int create(); int refresh(); int update(); int updateId(ID newId); int delete(); String objectToString(); ID extractId(); boolean objectsEqual(T other); void setDao(Dao<T, ID> dao); Dao<T, ID> getDao();  }### Answer:
@Test public void testCreate() throws Exception { Dao<One, Integer> dao = createDao(One.class, true); One one = new One(); String stuff = "fewpfjewfew"; one.stuff = stuff; one.setDao(dao); assertEquals(1, one.create()); }
@Test(expected = SQLException.class) public void testCreateNoDao() throws Exception { One one = new One(); String stuff = "fewpfjewfew"; one.stuff = stuff; one.create(); }