test_class.declarator: repository
test_class.modifier: private
test_class.original_string: private PreparationRepository repository;
test_class.type: PreparationRepository
test_class.var_name: repository
test_class.declarator: beanConversionService
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private BeanConversionService beanConversionService;
test_class.type: BeanConversionService
test_class.var_name: beanConversionService
test_class.file: dataprep-backend-service/src/test/java/org/talend/dataprep/preparation/store/inmemory/InMemoryPreparationRepositoryTest.java
test_class.identifier: InMemoryPreparationRepositoryTest
test_class.superclass: extends PreparationRepositoryTest
test_case.body: @Test
      public void getByDataSetTest() {
  
          // populate repository with noise (steps and preparations to be ignored)
          repository.add(getStep("s1"));
          repository.add(getStep("s2"));
          repository.add(getStep("s3"));
          repository.add(getStep("s4"));
          repository.add(getStep("s5"));
  
          repository.add(getPreparation("p1"));
          repository.add(getPreparation("p2"));
          repository.add(getPreparation("p3"));
          repository.add(getPreparation("p4"));
          repository.add(getPreparation("p5"));
  
          // add relevant data
          String dataSetId = "wantedId";
          Collection<Preparation> expected = Arrays.asList(getPreparation(dataSetId, "10"),
                  getPreparation(dataSetId, "11"), getPreparation(dataSetId, "12"));
          for (Preparation preparation : expected) {
              repository.add(preparation);
          }
  
          // run the test
          Collection<Preparation> actual =
                  getRepository().list(Preparation.class, eq("dataSetId", dataSetId)).collect(Collectors.toList());
  
          // check the result
          Assert.assertEquals(3, actual.size());
          for (Preparation preparation : expected) {
              Assert.assertTrue(actual.contains(preparation));
          }
      }
test_case.class_method_signature: InMemoryPreparationRepositoryTest.getByDataSetTest()
test_case.full_signature: @Test public void getByDataSetTest()
test_case.identifier: getByDataSetTest
test_case.invocations: add getStep add getStep add getStep add getStep add getStep add getPreparation add getPreparation add getPreparation add getPreparation add getPreparation asList getPreparation getPreparation getPreparation add collect list getRepository eq toList assertEquals size assertTrue contains
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getByDataSetTest()
focal_class.declarator: store = new HashMap<>()
focal_class.modifier: private final
focal_class.original_string: private final Map<String, Identifiable> store = new HashMap<>();
focal_class.type: Map<String, Identifiable>
focal_class.var_name: store
focal_class.file: dataprep-backend-service/src/main/java/org/talend/dataprep/preparation/store/inmemory/InMemoryPreparationRepository.java
focal_class.identifier: InMemoryPreparationRepository
focal_class.class_method_signature: InMemoryPreparationRepository.add(Identifiable object)
focal_class.full_signature: @Override public void add(Identifiable object)
focal_class.identifier: add
focal_class.modifiers: @Override public
focal_class.parameters: (Identifiable object)
focal_class.return: void
focal_class.signature: void add(Identifiable object)
focal_class.class_method_signature: InMemoryPreparationRepository.source(Class<T> clazz)
focal_class.full_signature: @Override @SuppressWarnings("unchecked") public Stream<T> source(Class<T> clazz)
focal_class.identifier: source
focal_class.modifiers: @Override @SuppressWarnings("unchecked") public
focal_class.parameters: (Class<T> clazz)
focal_class.return: Stream<T>
focal_class.signature: Stream<T> source(Class<T> clazz)
focal_class.class_method_signature: InMemoryPreparationRepository.get(String id, Class<T> clazz)
focal_class.full_signature: @Override @SuppressWarnings("unchecked") public T get(String id, Class<T> clazz)
focal_class.identifier: get
focal_class.modifiers: @Override @SuppressWarnings("unchecked") public
focal_class.parameters: (String id, Class<T> clazz)
focal_class.return: T
focal_class.signature: T get(String id, Class<T> clazz)
focal_class.class_method_signature: InMemoryPreparationRepository.clear()
focal_class.full_signature: @Override public void clear()
focal_class.identifier: clear
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clear()
focal_class.class_method_signature: InMemoryPreparationRepository.remove(Identifiable object)
focal_class.full_signature: @Override public void remove(Identifiable object)
focal_class.identifier: remove
focal_class.modifiers: @Override public
focal_class.parameters: (Identifiable object)
focal_class.return: void
focal_class.signature: void remove(Identifiable object)
focal_class.superclass: extends ObjectPreparationRepository
focal_method.body: @Override
      public void add(Identifiable object) {
          store.put(object.id(), object);
      }
focal_method.class_method_signature: InMemoryPreparationRepository.add(Identifiable object)
focal_method.full_signature: @Override public void add(Identifiable object)
focal_method.identifier: add
focal_method.invocations: put id
focal_method.modifiers: @Override public
focal_method.parameters: (Identifiable object)
focal_method.return: void
focal_method.signature: void add(Identifiable object)