### Question:
CacheKey implements Serializable { public CacheKey addAttribute(final String key, final String value) { if (key != null && value != null) { map.put(key, value); } return this; } CacheKey(final String groupName, final ResourceType type);  CacheKey(final String groupName, final ResourceType type, final boolean minimize); ResourceType getType(); String getGroupName(); boolean isMinimize(); CacheKey addAttribute(final String key, final String value); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void addingNullAttributeKeyShouldHaveNoEffect() { final CacheKey key = createValidCacheKey().addAttribute(null, ""); assertEquals(key, createValidCacheKey()); }
@Test public void addingNullAttributeValueShouldHaveNoEffect() { final CacheKey key = createValidCacheKey().addAttribute("key1", null); assertEquals(key, createValidCacheKey()); }