@Test
public void writeRstOnNonExistantStreamShouldSucceed() throws Exception {

    handler = newHandler();
    when(frameWriter.writeRstStream(eq(ctx), eq(NON_EXISTANT_STREAM_ID),
                                    eq(STREAM_CLOSED.code()), eq(promise))).thenReturn(future);
    handler.resetStream(ctx, NON_EXISTANT_STREAM_ID, STREAM_CLOSED.code(), promise);
    verify(frameWriter).writeRstStream(eq(ctx), eq(NON_EXISTANT_STREAM_ID), eq(STREAM_CLOSED.code()), eq(promise));
}