JBBPFieldArrayLong extends JBBPAbstractArrayField<JBBPFieldLong> implements JBBPNumericArray { @Override public long getAsLong(final int index) { return 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 testGetAsLong() { final long[] etalon = new long[] {-278349872364L, 12223423987439324L, 0L, -2782346872343L, 37238468273412L}; for (int i = 0; i < etalon.length; i++) { assertEquals(etalon[i], test.getAsLong(i)); } }
@Test public void testIterable() { final long[] etalon = new long[] {-278349872364L, 12223423987439324L, 0L, -2782346872343L, 37238468273412L}; int index = 0; for (final JBBPFieldLong f : test) { assertEquals(etalon[index++], f.getAsLong()); } }