@Test public void testSave() { when(dbStackRepository.save(dbStack)).thenReturn(dbStack); assertEquals(dbStack, underTest.save(dbStack)); verify(dbStackRepository).save(dbStack); }
public DBStack save(DBStack dbStack) { return dbStackRepository.save(dbStack); }
DBStackService { public DBStack save(DBStack dbStack) { return dbStackRepository.save(dbStack); } }
DBStackService { public DBStack save(DBStack dbStack) { return dbStackRepository.save(dbStack); }  }
DBStackService { public DBStack save(DBStack dbStack) { return dbStackRepository.save(dbStack); }  DBStack getById(Long id); Optional<DBStack> findById(Long id); DBStack getByNameAndEnvironmentCrn(String name, String environmentCrn); Optional<DBStack> findByNameAndEnvironmentCrn(String name, String environmentCrn); DBStack getByCrn(String crn); Optional<DBStack> getByCrn(Crn crn); Set<Long> findAllDeleting(); Set<Long> findAllDeletingById(Set<Long> dbStackIds); Set<DBStack> findAllForAutoSync(); DBStack save(DBStack dbStack); @Transactional void delete(DBStack dbStack); @Transactional void delete(Long dbStackId); }
DBStackService { public DBStack save(DBStack dbStack) { return dbStackRepository.save(dbStack); }  DBStack getById(Long id); Optional<DBStack> findById(Long id); DBStack getByNameAndEnvironmentCrn(String name, String environmentCrn); Optional<DBStack> findByNameAndEnvironmentCrn(String name, String environmentCrn); DBStack getByCrn(String crn); Optional<DBStack> getByCrn(Crn crn); Set<Long> findAllDeleting(); Set<Long> findAllDeletingById(Set<Long> dbStackIds); Set<DBStack> findAllForAutoSync(); DBStack save(DBStack dbStack); @Transactional void delete(DBStack dbStack); @Transactional void delete(Long dbStackId);  }