### Question:
BlobCrypterSecurityTokenCodec implements SecurityTokenCodec, ContainerConfig.ConfigObserver { public int getTokenTimeToLive() { return AbstractSecurityToken.DEFAULT_MAX_TOKEN_TTL; } @Inject  BlobCrypterSecurityTokenCodec(ContainerConfig config); void containersChanged(
      ContainerConfig config, Collection<String> changed, Collection<String> removed); SecurityToken createToken(Map<String, String> tokenParameters); String encodeToken(SecurityToken token); int getTokenTimeToLive(); int getTokenTimeToLive(String container); static final String SECURITY_TOKEN_KEY; static final String SIGNED_FETCH_DOMAIN; }### Answer:
@Test public void testGetTokenTimeToLive() throws Exception { Builder<String, Object> builder = ImmutableMap.builder(); Map<String, Object> container = builder.putAll(makeContainer("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()); }