### Question:
AuthController { @GetMapping("/token") public ApiToken token() throws JOSEException { final DateTime dateTime = DateTime.now(); JWTClaimsSet.Builder jwtClaimsSetBuilder = new JWTClaimsSet.Builder(); jwtClaimsSetBuilder.expirationTime(dateTime.plusMinutes(120).toDate()); jwtClaimsSetBuilder.claim("APP", "SAMPLE"); SignedJWT signedJWT = new SignedJWT(new JWSHeader(JWSAlgorithm.HS256), jwtClaimsSetBuilder.build()); signedJWT.sign(new MACSigner(SecurityConstant.JWT_SECRET)); return new ApiToken(signedJWT.serialize()); }  @GetMapping("/token") ApiToken token();  }### Answer:
@WithMockSaml(samlAssertFile = "/saml-auth-assert.xml") @Test public void testAuthController() throws JOSEException { final AuthController authController = new AuthController(); final ApiToken apiToken = authController.token(); Assert.assertNotNull(apiToken); Assert.assertTrue(apiToken.getToken().length() > 0); }