@Test
public void testPassThrough() throws Exception {

    // Given
    GenericCommand<String> command =
            getCommand("http://localhost:" + port + "/command/test/fail_with_500", Defaults.passthrough());
    try {
        // When
        command.run();
    } catch (TDPException e) {
        // Then
        // error() wasn't called, lastException must be null
        assertThat(lastException, nullValue());
        // underlying is returned as is (passthrough method).
        assertThat(e.getCode().getCode(), is(CommonErrorCodes.UNABLE_TO_SERIALIZE_TO_JSON.getCode()));
    }
}