IndexVolumeGroupDaoImpl implements IndexVolumeGroupDao { @Override public void delete(final String name) { final var indexVolumeGroupToDelete = get(name); genericDao.delete(indexVolumeGroupToDelete.getId()); } @Inject  IndexVolumeGroupDaoImpl(final IndexDbConnProvider indexDbConnProvider); @Override IndexVolumeGroup getOrCreate(final IndexVolumeGroup indexVolumeGroup); @Override IndexVolumeGroup update(IndexVolumeGroup indexVolumeGroup); @Override IndexVolumeGroup get(final int id); @Override IndexVolumeGroup get(final String name); @Override List<String> getNames(); @Override List<IndexVolumeGroup> getAll(); @Override void delete(final String name); @Override void delete(int id);  }
@Test void testDelete() { final var groupName = TestData.createVolumeGroupName(); final var group = createGroup(groupName); indexVolumeGroupDao.delete(group.getId()); final var deletedGroup = indexVolumeGroupDao.get(group.getId()); assertThat(deletedGroup).isNull(); }