Skip to content

Instantly share code, notes, and snippets.

@JemarJones
Created September 26, 2016 21:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JemarJones/fcce225de6a4d59025c4011f4f06395b to your computer and use it in GitHub Desktop.
Save JemarJones/fcce225de6a4d59025c4011f4f06395b to your computer and use it in GitHub Desktop.
Bug in okhttp3
package okhttp3;
import junit.framework.Assert;
import org.junit.Test;
public class ResponseBodyNeverNullTest {
@Test
public void responseBodyNeverNull() {
Response testResponse = new Response.Builder()
.protocol(Protocol.HTTP_1_1)
.code(200)
.request(
new Request.Builder()
.url("http://www.test.com")
.build()
)
.build();
Assert.assertNotNull(testResponse.body());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment