### Question:
JBBPFieldArrayUByte extends AbstractFieldByteArray<JBBPFieldUByte> { @Override public JBBPFieldUByte getElementAt(final int index) { final JBBPFieldUByte result = new JBBPFieldUByte(this.fieldNameInfo, this.array[index]); result.payload = this.payload; return result; } JBBPFieldArrayUByte(final JBBPNamedFieldInfo name, final byte[] array); byte[] getArray(); @Override int size(); @Override JBBPFieldUByte getElementAt(final int index); @Override int getAsInt(final int index); @Override Object getValueArrayAsObject(final boolean reverseBits); @Override String getTypeAsString();  }### Answer:
@Test public void testGetElementAt() { final int[] etalon = new int[] {255, 0, 1, 2, 3}; final Serializable payload = new FakePayload(); test.setPayload(payload); for (int i = 0; i < etalon.length; i++) { final JBBPFieldUByte f = test.getElementAt(i); assertSame(payload, f.getPayload()); assertEquals(etalon[i], f.getAsInt()); } }