@Test(expected = IllegalArgumentException.class)
  public void handlesRuntimeExceptionsCorrectly() {

    SampleDao dao = factory.getDao(SampleDao.class, new SampleCustomDaoImpl());
    dao.throwingRuntimeException();
  }
  @Test(expected = IOException.class)
  public void handlesCheckedExceptionsCorrectly() throws Exception {

    SampleDao dao = factory.getDao(SampleDao.class, new SampleCustomDaoImpl());
    dao.throwingCheckedException();
  }