Test class creation and initialization.
boolean stub_flag = false;
try {
SlotFactory.init();
}
catch (CardDeviceException e) {
if (e.getMessage().equals("stub")) {
stub_flag = true;
} else {
throw e;
}
}
if (!stub_flag) {
int slot = 0;
SecurityToken token = null;
Cad cad = new Cad(slot, token);
byte[] request = {
(byte)0x00, (byte)0xA4,
(byte)0x04, (byte)0x00, (byte)0x08,
(byte)0xA0, (byte)0x00, (byte)0x00,
(byte)0x00, (byte)0x18, (byte)0x43,
(byte)0x4D, (byte)0x00, (byte)0x3F};
int channel = cad.selectApplication(false, request);
assertTrue(true);
byte[] atr = cad.getATR();
assertNotEmpty("Empty ATR", atr);
} else {
assertTrue(true);
}