@Test
public void testHeaderSerialization() throws Exception
{
ObjectMapper mapper = new ObjectMapper();
mapper.setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);
mapper.enable(SerializationConfig.Feature.INDENT_OUTPUT);
JWSHeader header = new JWSHeader(Algorithm.HS256, null, null);
String val = header.toString();
System.out.println(val);
header = mapper.readValue(val, JWSHeader.class);
val = mapper.writeValueAsString(header);