@Override
    protected RecordIterator<Object[]> find(Map<String, Object> findConditionParameterMap,
                                            CompiledCondition compiledCondition) throws ConnectionUnavailableException {
        if (findMatchingEvent == null) {
            findMatchingEvent = new StateEvent(1, 0);
        }
        try {
            StreamEvent outEvent = inMemoryTable.find(compiledCondition, findMatchingEvent);
            List<Object[]> objects = new LinkedList<>();
            if (outEvent != null) {
                while (outEvent.hasNext()) {
                    objects.add(outEvent.getOutputData());
                    outEvent = outEvent.getNext();
                }
                objects.add(outEvent.getOutputData());
            }
            return new TestStoreWithCacheIterator(objects.iterator());
        } finally {
            findMatchingEvent = null;
        }
    }
Custom store for testing of in memory cache for store tables.
modules/siddhi-core/src/test/java/io/siddhi/core/query/table/util/TestStoreContainingInMemoryTable.java