public void setFlags(String flagsAsString) {
        String[] flagsArray = flagsAsString.split(",");
        this.flags = new Flag[flagsArray.length];

        for (int i = 0; i < flagsArray.length; i++) {
            this.flags[i] = Flag.valueOf(flagsArray[i]);
        }
    }
@Test
    public void embeddedCacheWithFlagsTest() throws Exception {
        InfinispanEmbeddedConfiguration configuration = new InfinispanEmbeddedConfiguration();
        configuration.setFlags(Flag.IGNORE_RETURN_VALUES);

        try (InfinispanEmbeddedManager manager = new InfinispanEmbeddedManager(configuration)) {
            manager.start();

            BasicCache<Object, Object> cache = manager.getCache("default");
            assertNotNull(cache);

            assertTrue(cache instanceof Cache);
            assertTrue(cache instanceof AdvancedCache);

            String key = UUID.randomUUID().toString();
            assertNull(cache.put(key, "val1"));

            // TODO: as we are testing a local cache,
            //assertNull(cache.put(key, "val2"));
        }
    }