modified testDeviceNCAP.java