@Test
public void testGroupActionSingleQueryException() throws QueryStoreException, JsonProcessingException {

    GroupRequest groupRequest = new GroupRequest();
    groupRequest.setTable(TestUtils.TEST_TABLE_NAME);
    groupRequest.setNesting(Arrays.asList("os"));
    when(elasticsearchServer.getClient()).thenReturn(null);
    try {
        queryExecutor.execute(groupRequest);
        fail();
    } catch (QueryStoreException ex) {
        assertEquals(QueryStoreException.ErrorCode.QUERY_EXECUTION_ERROR, ex.getErrorCode());
    }
}