### Question:
JWT { public DecodedJWT decodeJwt(String token) throws JWTDecodeException { return new JWTDecoder(parser, token); } JWT(); DecodedJWT decodeJwt(String token); static DecodedJWT decode(String token); static Verification require(Algorithm algorithm); static JWTCreator.Builder create();  }### Answer:
@Test public void shouldDecodeAStringTokenUsingInstance() throws Exception { String token = "eyJhbGciOiJIUzI1NiIsImN0eSI6IkpXVCJ9.eyJpc3MiOiJhdXRoMCJ9.mZ0m_N1J4PgeqWmi903JuUoDRZDBPB7HwkS4nVyWH1M"; JWT jwt = new JWT(); DecodedJWT decodedJWT = jwt.decodeJwt(token); assertThat(decodedJWT, is(notNullValue())); }
@Test public void shouldGetStringTokenUsingInstance() throws Exception { JWT jwt = new JWT(); DecodedJWT decodedJWT = jwt.decodeJwt("eyJhbGciOiJIUzI1NiJ9.e30.XmNK3GpH3Ys_7wsYBfq4C3M6goz71I7dTgUkuIa5lyQ"); assertThat(decodedJWT, is(notNullValue())); assertThat(decodedJWT.getToken(), is(notNullValue())); assertThat(decodedJWT.getToken(), is("eyJhbGciOiJIUzI1NiJ9.e30.XmNK3GpH3Ys_7wsYBfq4C3M6goz71I7dTgUkuIa5lyQ")); }