### Question:
DBRepositoryManager implements RepositoryManager { @Override public final boolean deleteRepository(final Repository<?> repository) { return repositoryDBManager.delete(repository); } DBRepositoryManager(final SessionFactory sessionFactory); @Override final Repository<?> getRepository(final String name); final Repository<?> getRepository(final Serializable id); @Override final List<Repository> getRepositoryList(final Class<? extends Repository> clazz); @Override final Repository<?> saveRepository(final Repository<?> repository); @Override final void updateRepository(final Repository<?> repository); @Override final boolean deleteRepository(final Repository<?> repository); @Override final RepoPackage getRepoPackage(final Serializable id); @Override final RepoPackage saveRepoPackage(final RepoPackage repoPackage);  }### Answer:
@Test public final void testDeleteRepository() throws IOException { DBRepositoryManager repoMan = new DBRepositoryManager(sessionFactory); Repository savedRepo = repoMan.saveRepository(getTestRepository()); RepoPackage repoPackage = getTestRepoPackage(savedRepo); Set<IMABaselineRecord> measurements = new HashSet<>(); measurements.add(getTestIMABaselineRecord()); repoPackage.setAllMeasurements(measurements, RepoPackageTest.getTestDigest()); repoMan.saveRepoPackage(repoPackage); Repository repositoryWithPackage = repoMan.getRepository(savedRepo.getId()); repoMan.deleteRepository(repositoryWithPackage); Assert.assertEquals(DBUtility.getCount(sessionFactory, YumRepository.class), 0); Assert.assertEquals(DBUtility.getCount(sessionFactory, RPMRepoPackage.class), 0); Assert.assertEquals(DBUtility.getCount(sessionFactory, IMABaselineRecord.class), 0); }