    @Test
    public void testAddWithGoodRequestParams() {

        // Arrange
        userEventController.commandGateway = gateway; //cheating a bit here, but mocking all the axon framework's beans is a pain.
        when(gateway.sendAndWait(any())).thenReturn(null);

        UserCreatedEvent userCreatedEvent = new UserCreatedEvent();
        userCreatedEvent.setId(1L);
        userCreatedEvent.setEmail("Test Create User");
        //Act
        userEventController.publishCreatedEvent(userCreatedEvent, mockHttpServletResponse);

        //Assert
        verify(gateway).sendAndWait(any());
        assertTrue(mockHttpServletResponse.getStatus() == HttpServletResponse.SC_CREATED);
    }