BaseResponse { public static final boolean isDataType(String contentType) { if (!StringUtils.isBlank(contentType)) { contentType = contentType.toLowerCase(); return contentType.contains("html") || contentType.contains("text") || contentType.contains("json") || contentType.contains("xml"); } return false; }  abstract String getValue(String key); String getLogMsg(); int getHttpCode(); void setHttpCode(int code); void setHttpMessage(String msg); void setHeader(String key, String value); String getHttpMsg(); String getHttpHeader(String header); Map<String, String> getHeaders(); void setResponseTime(long time); long getResponseTime(); void setResponseBody(String body); void setResponseBody(byte[] byteArray); String getResponseBody(); String getBody(); byte[] getResponseBytes(); int getResponseSize(); String getCookie(String key); void setCookie(String key, String value); Map<String, String> getCookies(); void logResponse(); static final boolean isDataType(String contentType);  }
@Test public void testIsDataType_1() throws Exception { String contentType = "text/html"; boolean result = BaseResponse.isDataType(contentType); assertTrue(result); }
@Test public void testIsDataType_2() throws Exception { String contentType = "application/pdf"; boolean result = BaseResponse.isDataType(contentType); assertTrue(!result); }
@Test public void testIsDataType_3() throws Exception { String contentType = "text/xml"; boolean result = BaseResponse.isDataType(contentType); assertTrue(result); }
@Test public void testIsDataType_4() throws Exception { String contentType = "image/png"; boolean result = BaseResponse.isDataType(contentType); assertTrue(!result); }
@Test public void testIsDataType_5() throws Exception { String contentType = ""; boolean result = BaseResponse.isDataType(contentType); assertTrue(!result); }