### Question:
TrainingSetManager { public synchronized void addTrainingSet(TrainingSet trainingSet) { trainingSet.setTrainingSetID(trainingSetIDCounter++); trainingSets.add(trainingSet); } TrainingSetManager(); synchronized void addTrainingSet(TrainingSet trainingSet); void addTrainingSets(Collection<TrainingSet> trainingSets); synchronized TrainingSet acquireTrainingSet(long id); boolean releaseTrainingSet(long id, boolean finished); void reset();  }### Answer:
@Test public void addTrainingSet() { TrainingSetManager manager = new TrainingSetManager(); manager.reset(); TrainingSet trainingSet = manager.acquireTrainingSet(0); assertThat(trainingSet).isNull(); fillTrainingSetManager(manager, 10); trainingSet = manager.acquireTrainingSet(0); assertThat(trainingSet).isNotNull(); TrainingSet trainingSet2 = manager.acquireTrainingSet(1); assertThat(trainingSet2).isNotNull(); assertThat(trainingSet).isNotEqualTo(trainingSet2); }