@Test(expected = IOException.class)
  public void handlesCheckedExceptionsCorrectly() throws Exception {

    SampleRepository repository =
        factory.getRepository(SampleRepository.class, new SampleCustomRepositoryImpl());
    repository.throwingCheckedException();
  }
  @Test(expected = IllegalArgumentException.class)
  public void handlesRuntimeExceptionsCorrectly() {

    SampleRepository repository =
        factory.getRepository(SampleRepository.class, new SampleCustomRepositoryImpl());
    repository.throwingRuntimeException();
  }