@Override
    protected void init(TableDefinition tableDefinition, ConfigReader configReader) {
        inMemoryTable = new InMemoryTable();

        MetaStreamEvent cacheTableMetaStreamEvent = new MetaStreamEvent();
        cacheTableMetaStreamEvent.addInputDefinition(tableDefinition);
        for (Attribute attribute : tableDefinition.getAttributeList()) {
            cacheTableMetaStreamEvent.addOutputData(attribute);
        }
        StreamEventCloner testTableStreamEventCloner = new StreamEventCloner(cacheTableMetaStreamEvent,
                storeEventPool);

        TableDefinition testStoreContainingIMTableDefinition = TableDefinition.id(tableDefinition.getId());
        for (Attribute attribute : tableDefinition.getAttributeList()) {
            testStoreContainingIMTableDefinition.attribute(attribute.getName(), attribute.getType());
        }
        for (Annotation annotation : tableDefinition.getAnnotations()) {
            if (!annotation.getName().equalsIgnoreCase("Store")) {
                testStoreContainingIMTableDefinition.annotation(annotation);
            }
        }

        inMemoryTable.init(testStoreContainingIMTableDefinition, storeEventPool, testTableStreamEventCloner,
                configReader, siddhiAppContext, recordTableHandler);
        ComplexEventChunk<StreamEvent> originalData = new ComplexEventChunk<>();
        StreamEvent data1 = new StreamEvent(0, 0, 3);
        data1.setOutputData(new Object[]{"WSO2", 55.6f, 100L});
        originalData.add(data1);
        StreamEvent data2 = new StreamEvent(0, 0, 3);
        data2.setOutputData(new Object[]{"IBM", 75.6f, 100L});
        originalData.add(data2);
        inMemoryTable.add(originalData);
    }
Custom store for testing of in memory cache for store tables.
modules/siddhi-core/src/test/java/io/siddhi/core/query/table/util/TestStoreForCachePreLoading.java