### Question:
PostmanService { String getContentType(KeyValue[] headers) { return Arrays.stream(headers) .filter(h -> "Content-Type".equals(h.getKey())) .findFirst() .map(KeyValue::getValue) .orElse(null); }  void parse(JsonParser parser, NewmanParsingResult result); List<ExecutedScenario> postProcess(Run run, NewmanParsingResult result, String newmanReportPath, AtomicInteger requestPosition); void deleteTempFiles(NewmanParsingResult newmanParsingResult); static final String FOLDER_DELIMITER; }### Answer:
@Test public void getContentType_should_return_null_when_not_found() { KeyValue[] headers = new KeyValue[] { new KeyValue().withKey("key").withValue("value") }; final String contentType = cut.getContentType(headers); assertThat(contentType).isNull(); }
@Test public void getContentType_should_return_the_content_type() { KeyValue[] headers = new KeyValue[] { new KeyValue().withKey("key1").withValue("value1"), new KeyValue().withKey("Content-Type").withValue("the-content-type"), new KeyValue().withKey("key3").withValue("value3") }; final String contentType = cut.getContentType(headers); assertThat(contentType).isEqualTo("the-content-type"); }