@Test
public void Given_Request_Is_HTTP_POST_And_Content_Header_Is_Not_Supported_Type_Then_Unsupported_Media_Type_Response_Is_Generated()
throws Exception {
- when(request.getHeader("Content-Type")).thenReturn("application/vnd.att-dr.feed; version=1.1");
+ when(request.getHeader("Content-Type")).thenReturn("application/vnd.dmaap-dr.feed; version=1.1");
when(request.getContentType()).thenReturn("stub_contentType");
drfeedsServlet.doPost(request, response);
verify(response)
@Test
public void Given_Request_Is_HTTP_POST_And_Feed_Is_Not_Valid_Object_Bad_Request_Response_Is_Generated()
throws Exception {
- when(request.getHeader("X-ATT-DR-ON-BEHALF-OF-GROUP")).thenReturn(null);
+ when(request.getHeader("X-DMAAP-DR-ON-BEHALF-OF-GROUP")).thenReturn(null);
JSONObject JSObject = buildRequestJsonObject();
DRFeedsServlet drfeedsServlet = new DRFeedsServlet() {
}
private void setUpValidContentHeadersAndJSONOnHttpRequest() {
- when(request.getHeader("Content-Type")).thenReturn("application/vnd.att-dr.feed; version=1.0");
- when(request.getHeader("X-ATT-DR-ON-BEHALF-OF-GROUP")).thenReturn("stub_subjectGroup");
+ when(request.getHeader("Content-Type")).thenReturn("application/vnd.dmaap-dr.feed; version=1.0");
+ when(request.getHeader("X-DMAAP-DR-ON-BEHALF-OF-GROUP")).thenReturn("stub_subjectGroup");
}
}