@Test
@PrepareForTest({Environment.class})

public void testGetItemFile() throws Exception {
    File file = new File("/dir/");
    when(mockContext.getExternalFilesDir(null)).thenReturn(file);
    Configuration.Item item = new Configuration.Item();
    item.location = "http://example.com/";
    assertEquals(new File("/dir/http%3A%2F%2Fexample.com%2F"), FileHelper.getItemFile(mockContext, item));
    item.location = "https://example.com/";
    assertEquals(new File("/dir/https%3A%2F%2Fexample.com%2F"), FileHelper.getItemFile(mockContext, item));
    item.location = "file:/myfile";
    assertNull(FileHelper.getItemFile(mockContext, item));
    mockStatic(Environment.class);
    when(Environment.getExternalStorageDirectory()).thenReturn(new File("/sdcard/"));
    item.location = "file:myfile";
    assertNull(null, FileHelper.getItemFile(mockContext, item));
    item.location = "ahost.com";
    assertNull(FileHelper.getItemFile(mockContext, item));
}