### Question:
JDBCSagaEventRepository { public void insert(final SagaEvent sagaEvent) { try (Connection connection = dataSource.getConnection()) { JDBCUtil.executeUpdate(connection, INSERT_SQL, generateParams(sagaEvent)); } catch (SQLException ex) { log.warn("Persist saga event failed", ex); } }  void insert(final SagaEvent sagaEvent);  }### Answer:
@Test @SneakyThrows public void assertInsert() { SagaEvent sagaEvent = mock(SagaEvent.class); when(sagaEvent.json(any(ToJsonFormat.class))).thenReturn("{}"); eventRepository.insert(sagaEvent); verify(statement).executeUpdate(); }