### Question:
BasicSecurityTokenCodec implements SecurityTokenCodec, ContainerConfig.ConfigObserver { public int getTokenTimeToLive() { return AbstractSecurityToken.DEFAULT_MAX_TOKEN_TTL; } BasicSecurityTokenCodec();  BasicSecurityTokenCodec(ContainerConfig config); String encodeToken(SecurityToken token); SecurityToken createToken(Map<String, String> parameters); int getTokenTimeToLive(); int getTokenTimeToLive(String container); void containersChanged(ContainerConfig config, Collection<String> changed,
          Collection<String> removed);  }### Answer:
@Test public void testGetTokenTimeToLive() throws Exception { Builder<String, Object> builder = ImmutableMap.builder(); Map<String, Object> container = builder .put(ContainerConfig.CONTAINER_KEY, ImmutableList.of("default", "tokenTest")) .put(SecurityTokenCodec.SECURITY_TOKEN_TTL_CONFIG, Integer.valueOf(300)).build(); config.newTransaction().addContainer(container).commit(); assertEquals("Token TTL matches what is set in the container config", 300, codec.getTokenTimeToLive("tokenTest")); assertEquals("Token TTL matches the default TTL", AbstractSecurityToken.DEFAULT_MAX_TOKEN_TTL, codec.getTokenTimeToLive()); }