boolean isComplete(GetQueryExecutionResponse getQueryExecutionResponse) {
        QueryExecutionState state = getQueryExecutionResponse.queryExecution().status().state();
        return state == QueryExecutionState.SUCCEEDED
                || state == QueryExecutionState.FAILED
                || state == QueryExecutionState.CANCELLED
                || state == QueryExecutionState.UNKNOWN_TO_SDK_VERSION;
    }
@Test
    public void isComplete() {
        Athena2QueryHelper helper = defaultAthena2QueryHelper();

        assertTrue(helper.isComplete(newGetQueryExecutionResponse(QueryExecutionState.SUCCEEDED)));
        assertTrue(helper.isComplete(newGetQueryExecutionResponse(QueryExecutionState.FAILED)));
        assertTrue(helper.isComplete(newGetQueryExecutionResponse(QueryExecutionState.CANCELLED)));
        assertTrue(helper.isComplete(newGetQueryExecutionResponse(QueryExecutionState.UNKNOWN_TO_SDK_VERSION)));

        assertFalse(helper.isComplete(newGetQueryExecutionResponse(QueryExecutionState.QUEUED)));
        assertFalse(helper.isComplete(newGetQueryExecutionResponse(QueryExecutionState.RUNNING)));
    }