@Test
public void testSubmitTransactionFail() throws IOException {

    mockWebServer.enqueue(
            new MockResponse()
                    .setResponseCode(400)
                    .setBody(failureResponse)
    );
    SubmitTransactionResponse response = server.submitTransaction(this.buildTransaction());
    assertFalse(response.isSuccess());
    assertNull(response.getLedger());
    assertNull(response.getHash());
    assertEquals(response.getExtras().getEnvelopeXdr(),
            "AAAAAK4Pg4OEkjGmSN0AN37K/dcKyKPT2DC90xvjjawKp136AAAAZAAKsZQAAAABAAAAAAAAAAEAAAAJSmF2YSBGVFchAAAAAAAAAQAAAAAAAAABAAAAAG9wfBI7rRYoBlX3qRa0KOnI75W5BaPU6NbyKmm2t71MAAAAAAAAAAABMS0AAAAAAAAAAAEKp136AAAAQOWEjL+Sm+WP2puE9dLIxWlOibIEOz8PsXyG77jOCVdHZfQvkgB49Mu5wqKCMWWIsDSLFekwUsLaunvmXrpyBwQ=");
    assertEquals(response.getExtras().getResultXdr(), "AAAAAAAAAGT/////AAAAAQAAAAAAAAAB////+wAAAAA=");
    assertNotNull(response.getExtras());
    assertEquals("tx_failed", response.getExtras().getResultCodes().getTransactionResultCode());
    assertEquals("op_no_destination", response.getExtras().getResultCodes().getOperationsResultCodes().get(0));
}