CacheHandleImpl implements CacheHandle { public boolean containsTag(CacheTag tag) { return tags.contains(tag); } CacheHandleImpl(String key, long expirationTime, long revalidationTime); protected  CacheHandleImpl(long expirationTime, long revalidationTime); String getKey(); long getCreationDate(); @Override Date setModificationDate(Date modificationDate); @Override Date getModificationDate(); final long getCacheExpirationTime(); final void setCacheExpirationTime(long expirationTime); final long getClientRevalidationTime(); final void setClientRevalidationTime(long revalidationTime); Set<CacheTag> getTagSet(); @Override int hashCode(); @Override boolean equals(Object o); boolean addTag(String key, String value); boolean addTag(CacheTag tag); boolean addTags(Collection<CacheTag> t); boolean removeTags(String name); boolean removeTag(String name, String value); void clearTags(); boolean containsTag(CacheTag tag); boolean containsTag(String name); boolean containsTag(String name, String value); boolean isTagged(); boolean removeTag(CacheTag tag); CacheTag[] getTags(); Iterator<CacheTag> tags(); @Override String toString();  }
@Test public void testContainsTagCacheTag() { assertTrue(handle.containsTag(tag)); assertTrue(handle.containsTag(otherTag)); assertFalse(handle.containsTag(new CacheTagImpl("u", "v"))); }
@Test public void testContainsTagString() { assertTrue(handle.containsTag(tag.getName())); assertTrue(handle.containsTag(otherTag.getName())); assertFalse(handle.containsTag("u")); }
@Test public void testContainsTagStringString() { assertTrue(handle.containsTag(tag.getName(), tag.getValue())); assertTrue(handle.containsTag(otherTag.getName(), otherTag.getValue())); assertFalse(handle.containsTag(tag.getName(), "x")); assertFalse(handle.containsTag("u", "v")); }