Jwt { public String getContentType() throws JwtExpiredException, JwtNotBeforeException { return getHeader(JwtNames.HEADER_CONTENT_TYPE); } Jwt(JSONObject header, JSONObject payload, Clock clock, Duration clockSkew); String getIssuer(); String getSubject(); List<String> getAudiences(); String getJwtId(); Instant getExpiration(); Instant getNotBefore(); Instant getIssuedAt(); Object getClaim(String name); String getType(); String getContentType(); String getAlgorithm(); String getKeyId();  }
@Test public void getContentType_success() throws Exception { JSONObject header = new JSONObject(); header.put(JwtNames.HEADER_CONTENT_TYPE, "foo"); Jwt token = new Jwt(header, new JSONObject(), Clock.systemUTC(), Duration.ZERO); assertThat(token.getContentType()).isEqualTo("foo"); }