def test_near_cache_config(self):
        config = NearCacheConfig(random_string())
        with self.assertRaises(ValueError):
            config.in_memory_format = 100

        with self.assertRaises(ValueError):
            config.eviction_policy = 100

        with self.assertRaises(ValueError):
            config.time_to_live_seconds = -1

        with self.assertRaises(ValueError):
            config.max_idle_seconds = -1

        with self.assertRaises(ValueError):
            config.eviction_max_size = 0
    def test_near_cache_config(self):
        config = NearCacheConfig(random_string())
        with self.assertRaises(ValueError):
            config.in_memory_format = 100

        with self.assertRaises(ValueError):
            config.eviction_policy = 100

        with self.assertRaises(ValueError):
            config.time_to_live_seconds = -1

        with self.assertRaises(ValueError):
            config.max_idle_seconds = -1

        with self.assertRaises(ValueError):
            config.eviction_max_size = 0