@Override
    protected RecordIterator<Object[]> query(Map<String, Object> parameterMap, CompiledCondition compiledCondition,
                                             CompiledSelection compiledSelection, Attribute[] outputAttributes)
            throws ConnectionUnavailableException {

        List<Object[]> objects = new LinkedList<>();

        switch (count) {
            case 0:
            case 1:
                objects.add(new Object[]{"WSO1", 55.6f, 1L});
                objects.add(new Object[]{"WSO2", 55.6f, 2L});
                objects.add(new Object[]{"WSO3", 55.6f, 3L});
                count++;
                break;
            case 2:
                objects.add(new Object[]{"WSO3", 55.6f, 3L});
                count++;
                break;
            default:
                // Not applicable
                break;
        }
        return new TestStoreWithCacheIterator(objects.iterator());
    }
Custom store for testing of in memory cache for store tables.
modules/siddhi-core/src/test/java/io/siddhi/core/query/table/util/TestStoreForCacheEnabledOptimisation.java