CommandApdu { public static CommandApdu create(byte[] apdu, int apduOffset, int apduLength) { return fromBytes(Arrays.copyOfRange(apdu, apduOffset, apduOffset + apduLength)); }  abstract int getCLA(); abstract int getINS(); abstract int getP1(); abstract int getP2(); @SuppressWarnings("mutable") abstract byte[] getData(); abstract int getNe(); static CommandApdu create(byte[] apdu, int apduOffset, int apduLength); static CommandApdu create(int cla, int ins, int p1, int p2); static CommandApdu create(int cla, int ins, int p1, int p2, int ne); static CommandApdu create(int cla, int ins, int p1, int p2, byte[] data); static CommandApdu create(int cla, int ins, int p1, int p2, byte[] data, int dataOffset, int dataLength); static CommandApdu create(int cla, int ins, int p1, int p2, byte[] data, int ne); static CommandApdu create(
            int cla, int ins, int p1, int p2, byte[] data, int dataOffset, int dataLength, int ne); static CommandApdu fromBytes(byte[] apdu, int offset, int length); static CommandApdu fromBytes(byte[] apdu); byte[] toBytes();  }
@Test public void testCase1() throws Exception { CommandApdu commandApdu = CommandApdu.create(CLA, INS, P1, P2); assertParsesCorrectly(commandApdu); }