TikaResourceHelper { static final <T> T[] concat(final T[] first, final T[] second) { T[] res = Arrays.copyOf(first, first.length + second.length); System.arraycopy(second, 0, res, first.length, second.length); return res; } private  TikaResourceHelper();  final static String TIKA_MIMETYPES; final static String CUSTOM_MIMETYPES; }
@SuppressWarnings("javadoc") @Test public final void testConcat() { Integer[] first = new Integer[] { Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3) }; Integer[] second = new Integer[] { Integer.valueOf(4), Integer.valueOf(5), Integer.valueOf(6) }; Integer[] concatRes = TikaResourceHelper.concat(first, second); Integer counter = Integer.valueOf(0); for (Integer frmRes : concatRes) { assertTrue("Expected elements in order, frmRes:" + frmRes + " <= counter:" + counter, frmRes > counter); counter++; } }