### Question:
JwtSubjectServletCreator implements SubjectCreate { @Override public boolean canSupportSubject(Object context) { if (context instanceof HttpServletRequest) { String authorization = ((HttpServletRequest)context).getHeader(AUTHORIZATION); if (authorization != null && authorization.startsWith(BEARER)) { String jwtValue = authorization.replace(BEARER, "").trim(); return !JsonWebTokenUtil.isNotJsonWebToken(jwtValue); } } return false; }  @Override boolean canSupportSubject(Object context); @Override Subject createSubject(Object context);  }### Answer:
@Test public void canSupportSubject() { String jwt = JsonWebTokenUtil.issueJwt(UUID.randomUUID().toString(), "tom", "token-server", 36000L, Arrays.asList("role2", "rol3"), null, Boolean.FALSE, SignatureAlgorithm.HS512); HttpServletRequest request = createNiceMock(HttpServletRequest.class); expect(request.getHeader(AUTHORIZATION)).andReturn(BEARER + " " + jwt); replay(request); assertTrue(creator.canSupportSubject(request)); verify(request); }