TranslationKitStep extends BasePipelineStep { @Override protected Event handleStartDocument(Event event) { translationKitTextUnits = new ArrayList<>(); return event; } TranslationKitStep(Long translationKitId); @Override String getName(); @Override String getDescription();  }
@Test public void testHandleStartDocument() { logger.debug("Ids for entities worked on"); Long translationKitId = 987654321L; logger.debug("Create instance to be tested, inject mocks and state"); TranslationKitStep translationKitStep = new TranslationKitStep(translationKitId); translationKitStep.translationKitTextUnits = null; logger.debug("Build test input"); Event event = new Event(EventType.START_DOCUMENT); logger.debug("Test and assert"); Event result = translationKitStep.handleStartDocument(event); assertEquals("the input event should be returned", event, result); assertNotNull("TranslationKitTextUnits must have been initialized", translationKitStep.translationKitTextUnits); }