public static <T> T[] prependOptions(T[] oldOpts, T... newOpts) {
    // copy the new options to the front of the array
    T[] result = Arrays.copyOf(newOpts, newOpts.length+oldOpts.length);
    // now copy the old options
    System.arraycopy(oldOpts, 0, result, newOpts.length, oldOpts.length);
    return result;
  }
@Test
  public void testAppend() throws Exception {
    assertArrayEquals("first append",
                      new String[]{"Dr.", "Who", "hi", "there"},
                      Options.prependOptions(new String[]{"hi", "there"},
                                             "Dr.", "Who"));
    assertArrayEquals("second append",
                      new String[]{"aa","bb","cc","dd","ee","ff"},
                      Options.prependOptions(new String[]{"dd", "ee", "ff"},
                                             "aa", "bb", "cc"));
  }