// Path: src/main/java/com/hackerrank/CircularArrayRotation.java
// static int getValueAfterRotation(int[] arr, int rot, int idx) {
//     return arr[(arr.length + (idx - rot % arr.length)) % arr.length];
// }


import org.junit.Test;
import static com.hackerrank.CircularArrayRotation.getValueAfterRotation;
import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.junit.Assert.*;
package com.hackerrank;



public class CircularArrayRotationTest {

    @Test
    public void shouldRotateShortArray() {
        int arr[] = new int[]{1, 2};
// Path: src/main/java/com/hackerrank/CircularArrayRotation.java
// static int getValueAfterRotation(int[] arr, int rot, int idx) {
//     return arr[(arr.length + (idx - rot % arr.length)) % arr.length];
// }


// Path: src/test/java/com/hackerrank/CircularArrayRotationTest.java
import org.junit.Test;
import static com.hackerrank.CircularArrayRotation.getValueAfterRotation;
import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.junit.Assert.*;

package com.hackerrank;



public class CircularArrayRotationTest {

    @Test
    public void shouldRotateShortArray() {
        int arr[] = new int[]{1, 2};
        int value = getValueAfterRotation(arr, 1, 0);