Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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