QueryService mockQueryService() throws RegionNotFoundException, IndexInvalidException, IndexNameConflictException, IndexExistsException, UnsupportedOperationException {
QueryService queryService = mock(QueryService.class);
when(queryService.getIndexes()).thenReturn(new ArrayList<Index>());
when(queryService.createIndex(anyString(), anyString(),anyString())).thenAnswer(new Answer<Index>() {
@Override
public Index answer(InvocationOnMock invocation) throws Throwable {
String indexName = (String) invocation.getArguments()[0];
String indexedExpression = (String) invocation.getArguments()[1];
String fromClause = (String) invocation.getArguments()[2];