JBBPFieldArrayLong extends JBBPAbstractArrayField<JBBPFieldLong> implements JBBPNumericArray { @Override public int getAsInt(final int index) { return (int) this.array[index]; } JBBPFieldArrayLong(final JBBPNamedFieldInfo name, final long[] array); long[] getArray(); @Override int size(); @Override JBBPFieldLong getElementAt(final int index); @Override int getAsInt(final int index); @Override long getAsLong(final int index); @Override boolean getAsBool(final int index); @Override Object getValueArrayAsObject(final boolean reverseBits); @Override String getTypeAsString();  }
@Test public void testGetAsInt() { final int[] etalon = new int[] {(int) -278349872364L, (int) 12223423987439324L, (int) 0L, (int) -2782346872343L, (int) 37238468273412L}; for (int i = 0; i < etalon.length; i++) { assertEquals(etalon[i], test.getAsInt(i)); } }