### Question:
BatchingRelatedItemReferenceEventHanderFactory implements RelatedItemReferenceEventHandlerFactory { @Override public RelatedItemReferenceEventHandler getHandler() { return new BatchingRelatedItemReferenceEventHandler(configuration.getIndexBatchSize(),repository.getRepository(configuration),locationMapper); } BatchingRelatedItemReferenceEventHanderFactory(Configuration config,
                                                          RelatedItemStorageRepositoryFactory repository,
                                                          RelatedItemStorageLocationMapper locationMapper); @Override RelatedItemReferenceEventHandler getHandler();  }### Answer:
@Test public void testFactoryCreatesNewBatchingRelatedItemReferenceEventHander() { BatchingRelatedItemReferenceEventHanderFactory factory = new BatchingRelatedItemReferenceEventHanderFactory(new SystemPropertiesConfiguration(),repo,null); assertNotSame(factory.getHandler(),factory.getHandler()); assertEquals(2,repo.getInvocationCount()); }