Disappointing, but you will have to use RobolectricTestRunner instead of the standard JUnit.
isLoggable is a native method, so it is not available at run time.
If you are using Volley or apachehttp-client, the biggest problem is that isLoggable is called as instantiating a field, for example:
private static final DEBUG = Log.isLoggable(..);
Which is completely useless, given that this method is simply not available at all in these libraries at runtime, so even AndroidTestCase cannot save you.
Fortunately, Robolectric does a great job of this.
Edit April 4, 2017
JUnit 5 is now available, and I have not tested it with this tester.
source share