### Question:
RestHelper { public static final <T> List<T> reverse(final List<T> strings) { final LinkedList<T> result = new LinkedList<T>(); for (final T s : strings) { result.addFirst(s); } return Collections.unmodifiableList(result); }  static final List<Param> computeRequestTemplateParams(final Resource resource,
            final Stack<Resource> ancestors); static final List<T> reverse(final List<T> strings);  }### Answer:
@Test public void testReverse() { List<Integer> numbers = new ArrayList<Integer>(3); numbers.add(1); numbers.add(2); numbers.add(3); List<Integer> reversedNumbers = RestHelper.reverse(numbers); Integer crntNumber = 3; assertEquals(3, reversedNumbers.size()); for (Integer i : reversedNumbers) { assertEquals(crntNumber--, i); } }
@Test public void testReverseEmpty() { List<Integer> numbers = new ArrayList<Integer>(0); List<Integer> reversedNumbers = RestHelper.reverse(numbers); assertEquals(0, reversedNumbers.size()); }
@Test public void testReverseOne() { List<Integer> numbers = new ArrayList<Integer>(1); numbers.add(9); List<Integer> reversedNumbers = RestHelper.reverse(numbers); assertEquals(1, reversedNumbers.size()); assertEquals((Integer) 9, (Integer) reversedNumbers.get(0)); }