### Question:
DefaultSecurityTokenCodec implements SecurityTokenCodec { public SecurityToken createToken(Map<String, String> tokenParameters) throws SecurityTokenException { return codec.createToken(tokenParameters); } @Inject  DefaultSecurityTokenCodec(ContainerConfig config); SecurityToken createToken(Map<String, String> tokenParameters); String encodeToken(SecurityToken token); int getTokenTimeToLive(); int getTokenTimeToLive(String container);  }### Answer:
@Test public void testBasicDecoder() throws Exception { DefaultSecurityTokenCodec codec = new DefaultSecurityTokenCodec( new FakeContainerConfig("insecure")); Long expires = System.currentTimeMillis() / 1000 + 500; String token = "o:v:app:domain:appurl:12345:container:" + Long.toString(expires, 10); Map<String, String> parameters = Collections.singletonMap( SecurityTokenCodec.SECURITY_TOKEN_NAME, token); SecurityToken st = codec.createToken(parameters); assertEquals("o", st.getOwnerId()); assertEquals("v", st.getViewerId()); assertEquals("appurl", st.getAppUrl()); assertEquals("container", st.getContainer()); assertEquals(expires, st.getExpiresAt()); }