@Test
public void findBestSampleSize() {

    // desired == actual == 1
    assertEquals(1, ImageRequest.findBestSampleSize(100, 150, 100, 150));
    // exactly half == 2
    assertEquals(2, ImageRequest.findBestSampleSize(280, 160, 140, 80));
    // just over half == 1
    assertEquals(1, ImageRequest.findBestSampleSize(1000, 800, 501, 401));
    // just under 1/4 == 4
    assertEquals(4, ImageRequest.findBestSampleSize(100, 200, 24, 50));
}