@Test
public void testScaleChip() {

  when(overviewImage.getWidth()).thenReturn(1024);
  when(overviewImage.getHeight()).thenReturn(1024);
  when(originalImage.getWidth()).thenReturn(2048);
  when(originalImage.getHeight()).thenReturn(2048);
  int[] values = new int[] {100, 100, 400, 400};
  args.put("x", values[0]);
  args.put("y", values[1]);
  args.put("w", values[2]);
  args.put("h", values[3]);
  int[] scaledValues = cropAdapter.scaleChip(originalImage, overviewImage, args);
  for (int i = 0; i < values.length; i++) {
    assertThat(scaledValues[i], is(values[i] * 2));
  }
}