### Question:
BasicHeader implements Header, Serializable { @Override public Claim getHeaderClaim(String name) { return extractClaim(name, tree, objectReader); } BasicHeader(String algorithm, String type, String contentType, String keyId, Map<String, JsonNode> tree, ObjectReader objectReader); @Override String getAlgorithm(); @Override String getType(); @Override String getContentType(); @Override String getKeyId(); @Override Claim getHeaderClaim(String name);  }### Answer:
@Test public void shouldGetExtraClaim() throws Exception { Map<String, JsonNode> tree = new HashMap<>(); tree.put("extraClaim", new TextNode("extraValue")); BasicHeader header = new BasicHeader(null, null, null, null, tree, objectReader); assertThat(header, is(notNullValue())); assertThat(header.getHeaderClaim("extraClaim"), is(instanceOf(JsonNodeClaim.class))); assertThat(header.getHeaderClaim("extraClaim").asString(), is("extraValue")); }
@Test public void shouldGetNotNullExtraClaimIfMissing() throws Exception { Map<String, JsonNode> tree = new HashMap<>(); BasicHeader header = new BasicHeader(null, null, null, null, tree, objectReader); assertThat(header, is(notNullValue())); assertThat(header.getHeaderClaim("missing"), is(notNullValue())); assertThat(header.getHeaderClaim("missing"), is(instanceOf(NullClaim.class))); }