Skip to content

Instantly share code, notes, and snippets.

View makovkastar's full-sized avatar

Oleksandr Melnykov makovkastar

View GitHub Profile
public class URLRequestUnit extends InstrumentationTestCase
{
private static final String API_URL =
"http://www.example.com/api/users";
public void testHttpOkay() throws Exception {
MockURLStreamHandler handler = new MockURLStreamHandler();
URL.setURLStreamHandlerFactory(handler);
UsersRequest request = new UsersRequest();