@Test
public void immidiateCassandraExceptionReturnsPermit() throws InterruptedException, ExecutionException {

    when(rateLimiter.acquireAsync()).thenReturn(Futures.immediateFuture(null));
    when(session.executeAsync(statement)).thenThrow(new UnsupportedFeatureException(ProtocolVersion.V3, "hjg"));
    resultSetFuture = new RateLimitedResultSetFuture(session, rateLimiter, statement);
    ListenableFuture<Row> transform = Futures.transform(resultSetFuture, ResultSet::one);
    try {
        transform.get();
        fail();
    } catch (Exception e) {
        assertTrue(e instanceof ExecutionException);
    }
    verify(rateLimiter, times(1)).acquireAsync();
    verify(rateLimiter, times(1)).release();
}