@Test
@PrepareForTest(Log.class)
public void testCloseOrWarn_closeable() throws Exception {

    Closeable closeable = mock(Closeable.class);
    mockStatic(Log.class);
    when(Log.e(anyString(), anyString(), any(Throwable.class))).then(new CountingAnswer(null));
    // Closing null should work just fine
    testResult = 0;
    assertNull(FileHelper.closeOrWarn((Closeable) null, "tag", "msg"));
    assertEquals(0, testResult);
    // Successfully closing the file should not log.
    testResult = 0;
    assertNull(FileHelper.closeOrWarn(closeable, "tag", "msg"));
    assertEquals(0, testResult);
    // If closing fails, it should log.
    when(closeable).thenThrow(new IOException("Foobar"));
    testResult = 0;
    assertNull(FileHelper.closeOrWarn(closeable, "tag", "msg"));
    assertEquals(1, testResult);
}