@Test public void testerIsStored() { trainerService.saveTraier(tester); long testerId = tester.getId(); assertEquals(tester, trainerService.getTrainer(testerId)); }
@Override public void add(Trainer trainer) { trainer.setId(this.getNextId()); this.database.put(trainer.getId(), trainer); }