### Question:
CloseSessionCmdBuild extends AbstractPoCommandBuilder<CloseSessionRespPars> { public CloseSessionCmdBuild(PoClass poClass, boolean ratificationAsked, byte[] terminalSessionSignature) throws IllegalArgumentException { super(command, null); if (terminalSessionSignature != null && terminalSessionSignature.length != 4 && terminalSessionSignature.length != 8) { throw new IllegalArgumentException("Invalid terminal sessionSignature: " + ByteArrayUtils.toHex(terminalSessionSignature)); } byte p1 = ratificationAsked ? (byte) 0x80 : (byte) 0x00; byte le = 0; request = setApduRequest(poClass.getValue(), command, p1, (byte) 0x00, terminalSessionSignature, le); } CloseSessionCmdBuild(PoClass poClass, boolean ratificationAsked,
            byte[] terminalSessionSignature);  CloseSessionCmdBuild(PoClass poClass); @Override CloseSessionRespPars createResponseParser(ApduResponse apduResponse);  }### Answer:
@Test public void closeSessionCmdBuild() throws IllegalArgumentException { byte[] request2_4 = new byte[] {(byte) 0x94, (byte) 0x8E, 0x00, 0x00, (byte) 0x04, (byte) 0xA8, 0x31, (byte) 0xC3, 0x3E, 0x00}; byte[] request3_1 = new byte[] {(byte) 0x00, (byte) 0x8E, (byte) 0x80, 0x00, (byte) 0x04, (byte) 0xA8, 0x31, (byte) 0xC3, 0x3E, 0x00}; byte[] terminalSessionSignature = new byte[] {(byte) 0xA8, 0x31, (byte) 0xC3, 0x3E}; AbstractApduCommandBuilder apduCommandBuilder = new CloseSessionCmdBuild(PoClass.LEGACY, false, terminalSessionSignature); ApduRequest reqApdu = apduCommandBuilder.getApduRequest(); Assert.assertArrayEquals(request2_4, reqApdu.getBytes()); apduCommandBuilder = new CloseSessionCmdBuild(PoClass.ISO, true, terminalSessionSignature); reqApdu = apduCommandBuilder.getApduRequest(); Assert.assertArrayEquals(request3_1, reqApdu.getBytes()); }