List of usage examples for android.test MoreAsserts assertEmpty
public static void assertEmpty(Map<?, ?> map)
From source file:com.google.android.apps.authenticator.timesync.NetworkTimeProviderTest.java
public void testRequest() throws Exception { withHttpRequestThrowing(new IOException("arbitrary")); try {//from w ww. ja v a2s .com mProvider.getNetworkTime(); } catch (Exception expected) { } ArgumentCaptor<HttpUriRequest> requestCaptor = ArgumentCaptor.forClass(HttpUriRequest.class); verify(mMockHttpClient).execute(requestCaptor.capture()); HttpUriRequest request = requestCaptor.getValue(); assertEquals("HEAD", request.getMethod()); assertEquals("https://www.google.com", request.getURI().toString()); MoreAsserts.assertEmpty(Arrays.asList(request.getAllHeaders())); }