    @Test
    public void clearTest() throws PulsarClientException {

       PulsarClientLRUCache<String, Producer> cache = new PulsarClientLRUCache<String, Producer>(26);

       for (Character i='A'; i<='Z'; i++) {
          cache.put(i.toString(), mockedPulsarProducer);
       }

       // Make sure we only have all the items in the cache
       assertEquals(26, cache.size());
       cache.clear();

       verify(mockedPulsarProducer, times(26)).close();

       // Make sure all the items were removed
       assertEquals(0, cache.size());
    }