@Test
public void testRotate() {

    int[] pixels = new int[] {
            1, 2, 3, 4,
            5, 6, 7, 8,
            9, 10, 11, 12
    };
    int[] expected = new int[] {
            9, 5, 1,
            10, 6, 2,
            11, 7, 3,
            12, 8, 4
    };
    assertArrayEquals(BitmapUtils.rotate(pixels, 4, 3, null), expected);
}