### Question:
GitTagEventProcessor implements GitEventProcessor { @Override public void processEvent(final GitEvent event) { if (!validateEvent(event)) { return; } log.debug("Processing event: {}", event); fetchPipeline(event, apiClient).ifPresent(pipeline -> { final GitEventData eventData = GitEventData.builder() .gitEventType(supportedEventType()) .version(fetchVersion(event)) .build(); final PipelineEvent pipelineEvent; try { pipelineEvent = PipelineEvent.builder() .objectType(PipelineEvent.ObjectType.PIPELINE_CODE) .eventType(fetchPipelineEventType(event)) .createdDate(LocalDateTime.now()) .objectId(pipeline.getId()) .data(objectMapper.writeValueAsString(eventData)) .build(); eventDao.createPipelineEvent(pipelineEvent); } catch (JsonProcessingException e) { log.error(e.getMessage(), e); } }); }  @Override GitEventType supportedEventType(); @Override void processEvent(final GitEvent event);  }### Answer:
@Test void shouldProcessTagEventTest() throws IOException { Pipeline pipeline = new Pipeline(); pipeline.setId(1L); pipeline.setName(TEST_NAME); pipeline.setRepository(TEST_PATH); when(apiClient.loadPipelineByRepositoryUrl(anyString())).thenReturn(pipeline); gitTagEventProcessor.processEvent(gitEvent); LocalDateTime dateTime = LocalDateTime.now(); List<PipelineEvent> pipelineCodeEvents = eventDao.loadPipelineEventsByObjectType( PipelineEvent.ObjectType.PIPELINE_CODE, dateTime); assertEquals(1, pipelineCodeEvents.size()); PipelineEvent event = pipelineCodeEvents.get(0); Map<String, Object> map = objectMapper.readValue(event.getData(), new TypeReference<Map<String, String>>(){}); assertAll("event", () -> assertEquals(PipelineEvent.ObjectType.PIPELINE_CODE, event.getObjectType()), () -> assertEquals(EventType.INSERT, event.getEventType()), () -> assertEquals(GitEventType.tag_push.name(), map.get("gitEventType")), () -> assertEquals(BRANCH, map.get("version"))); }