@Test
public void testMoveToBack() throws Exception {

    assertThat(moveToBack(new int[]{0, 1, 2}, 0), is(new int[]{1, 2, 0}));
    assertThat(moveToBack(new int[]{0, 1, 2}, 1), is(new int[]{0, 2, 1}));
    assertThat(moveToBack(new int[]{0, 1, 2}, 2), is(new int[]{0, 1, 2}));
    assertThat(moveToBack(new int[]{0, 1, 2, 4, 5, 6}, 2), is(new int[]{0, 1, 4, 5, 6, 2}));
}