### Question:
PentahoCacheTemplateConfiguration { public PentahoCacheTemplateConfiguration overrideProperties( final Map<String, String> templateOverrides ) { Map<String, String> overriddenProperties = ImmutableMap.<String, String>builder() .putAll( Maps.filterKeys( getProperties(), new Predicate<String>() { @Override public boolean apply( String s ) { return !templateOverrides.containsKey( s ); } } ) ).putAll( templateOverrides ).build(); return new PentahoCacheTemplateConfiguration( getDescription(), overriddenProperties, getCacheManager() ); } PentahoCacheTemplateConfiguration( String description, Map<String, String> properties,
                                            PentahoCacheManager cacheManager ); String getDescription(); Map<String, String> getProperties(); PentahoCacheManager getCacheManager(); Configuration<K, V> createConfiguration( Class<K> keyType, Class<V> valueType ); Cache<K, V> createCache( String cacheName, Class<K> keyType, Class<V> valueType ); PentahoCacheTemplateConfiguration overrideProperties( final Map<String, String> templateOverrides );  }### Answer:
@Test public void testOverrideProperties() throws Exception { PentahoCacheTemplateConfiguration templateConfiguration = new PentahoCacheTemplateConfiguration( "description", ImmutableMap.of( "foo", "bar", "baz", "bop", "ttl", "60" ), mock( PentahoCacheManager.class ) ); assertEquals( "60", templateConfiguration.getProperties().get( "ttl" ) ); PentahoCacheTemplateConfiguration overriddenConfig = templateConfiguration.overrideProperties( ImmutableMap.of( "ttl", "120", "marco", "polo" ) ); assertEquals( "120", overriddenConfig.getProperties().get( "ttl" ) ); assertEquals( "polo", overriddenConfig.getProperties().get( "marco" ) ); assertEquals( "bar", overriddenConfig.getProperties().get( "foo" ) ); assertEquals( "bop", overriddenConfig.getProperties().get( "baz" ) ); }