1 package com.diasparsoftware.htmlunitx.test; 2 3 import java.io.*; 4 import java.net.URL; 5 6 import com.diasparsoftware.htmlunitx.*; 7 8 public class EmptyInputStreamWebResponseTest 9 extends AbstractWebResponseTestCase { 10 11 private byte[] contentAsBytes = new byte[0]; 12 private ByteArrayInputStream contentAsStream = 13 new ByteArrayInputStream(contentAsBytes); 14 15 protected TestableWebResponse makeActualWebResponse() 16 throws Exception { 17 18 return new InputStreamWebResponse( 19 new URL("http://foo"), 20 contentAsStream); 21 } 22 23 protected byte[] getExpectedResponseBody() throws Exception { 24 return contentAsBytes; 25 } 26 27 protected InputStream getExpectedContentAsStream() 28 throws Exception { 29 30 return contentAsStream; 31 } 32 33 protected String getExpectedContentAsString() throws Exception { 34 return ""; 35 } 36 }