final String queueName = randomString();
final Config config = new Config();
final QueueConfig queueConfig = config.getQueueConfig(queueName);
final QueueStoreConfig queueStoreConfig = new QueueStoreConfig();
queueStoreConfig.setEnabled(false);
final QueueStoreFactory queueStoreFactory = new SimpleQueueStoreFactory();
queueStoreConfig.setFactoryImplementation(queueStoreFactory);
queueConfig.setQueueStoreConfig(queueStoreConfig);
HazelcastInstance instance = createHazelcastInstance(config);
final IQueue<Integer> queue = instance.getQueue(queueName);
queue.add(1);
final QueueStore queueStore = queueStoreFactory.newQueueStore(queueName, null);
final TestQueueStore testQueueStore = (TestQueueStore) queueStore;
final int size = testQueueStore.store.size();
assertEquals("Expected not queue store operation" +
" since we disabled it in QueueStoreConfig but found initialized ", 0, size);