### Question:
BasicHeader implements Header, Serializable { @Override public String getContentType() { return contentType; } 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 shouldGetContentType() throws Exception { BasicHeader header = new BasicHeader(null, null, "content", null, null, objectReader); assertThat(header, is(notNullValue())); assertThat(header.getContentType(), is(notNullValue())); assertThat(header.getContentType(), is("content")); }
@Test public void shouldGetNullContentTypeIfMissing() throws Exception { BasicHeader header = new BasicHeader(null, null, null, null, null, objectReader); assertThat(header, is(notNullValue())); assertThat(header.getContentType(), is(nullValue())); }