@Test(expected = SecurityTokenException.class)
public void testGetTokenException() throws Exception {
GadgetsHandlerApi.TokenRequest request = createTokenRequest(FakeProcessor.SPEC_URL, CONTAINER,
createAuthContext(OWNER, VIEWER), ImmutableList.of("*"));
replay();
tokenCodec.exc = new SecurityTokenException("bad data");
gadgetHandler.getToken(request);
}