### Question:
SimpleCachedDaoEPForwardingTemplateImpl implements SimpleCachedDao<IpPrefix, EndpointForwardingTemplateBySubnet> { @Override public EndpointForwardingTemplateBySubnet update(@Nonnull final IpPrefix key, @Nullable final EndpointForwardingTemplateBySubnet value) { final EndpointForwardingTemplateBySubnet previousValue; if (EPTemplateUtil.isPlain(key)) { previousValue = updatePlainCache(key, value); } else { previousValue = updateSubnetCache(key, value); } return previousValue; } SimpleCachedDaoEPForwardingTemplateImpl(); @Override EndpointForwardingTemplateBySubnet update(@Nonnull final IpPrefix key, @Nullable final EndpointForwardingTemplateBySubnet value); @Override Optional<EndpointForwardingTemplateBySubnet> find(@Nonnull final IpPrefix key); @Override void invalidateCache(); @Override boolean isEmpty(); @Override Iterable<EndpointForwardingTemplateBySubnet> values(); @Override Iterable<IpPrefix> keySet();  }### Answer:
@Test public void testUpdate() throws Exception { dao.update(IP_PREFIX_1, buildValue(IP_PREFIX_1)); dao.update(IP_PREFIX_2, buildValue(IP_PREFIX_2)); Assert.assertEquals(2, Iterables.size(dao.values())); }