System.out.println ( "Active/Inactive" );
    public static void testItems ( OPCGroup group, String ...itemIDs ) throws IllegalArgumentException, UnknownHostException, JIException    {        OPCItemMgt itemManagement = group.getItemManagement ();        List<OPCITEMDEF> items = new ArrayList<OPCITEMDEF> ( itemIDs.length );        for ( String id : itemIDs )        {            OPCITEMDEF item = new OPCITEMDEF ();            item.setItemID ( id );            items.add ( item );            }                OPCITEMDEF[] itemArray = items.toArray ( new OPCITEMDEF[0] );                System.out.println ( "Validate" );        KeyedResultSet<OPCITEMDEF,OPCITEMRESULT> result = itemManagement.validate ( itemArray );        if ( !dumpOPCITEMRESULT ( result ) )            return;                // now add them to the group        System.out.println ( "Add" );        result = itemManagement.add ( itemArray );        if ( !dumpOPCITEMRESULT ( result ) )            return;                // get the server handle array        Integer[] serverHandles = new Integer[itemArray.length ];        for ( int i = 0; i < itemArray.length; i++ )        {            serverHandles[i] = result.get ( i ).getValue ().getServerHandle ();        }                System.out.println ( "Active/Inactive" );        // set them active        itemManagement.setActiveState ( true, serverHandles );        // set them inactive        itemManagement.setActiveState ( false, serverHandles );                // finally remove them again        System.out.println ( "Remove" );        itemManagement.remove ( serverHandles );    }