@Test
    public void testRemoveArgs() {
        System.out.println("removeArgs");


        NodeVariable.resetIds();
        NodeFunction.resetIds();
        NodeArgument.resetIds();


        COP_Instance cop = null;
        try {
            cop = Cerberus.getInstanceFromFile("bounded_arity5.cop2");
        } catch (InvalidInputFileException ex) {
            ex.printStackTrace();
        }
        for (NodeFunction f : cop.getNodefunctions()) {
            if (f.id() == 4){
                System.out.println("Found f: "+f);
                instance = f.getFunction();
            }

        }
        System.out.println("Function selected:\n"+instance);

        LinkedList<NodeVariable> args = new LinkedList<NodeVariable>();
        args.add(NodeVariable.getNodeVariable(1));
        args.add(NodeVariable.getNodeVariable(5));
        args.add(NodeVariable.getNodeVariable(2));
        args.add(NodeVariable.getNodeVariable(2));
        args.add(NodeVariable.getNodeVariable(13));

        instance.removeArgs(args);

        NodeArgument[] arguments = {
            NodeArgument.getNodeArgument("0"),
            NodeArgument.getNodeArgument("0")
        };
        assertEquals(instance.evaluate(arguments), 2.0, 0.0);

        arguments[0]=NodeArgument.getNodeArgument("0");
        arguments[1]=NodeArgument.getNodeArgument("1");
        assertEquals(instance.evaluate(arguments), 3.0, 0.0);

        arguments[0]=NodeArgument.getNodeArgument("1");
        arguments[1]=NodeArgument.getNodeArgument("0");
        assertEquals(instance.evaluate(arguments), 43.0, 0.0);

        arguments[0]=NodeArgument.getNodeArgument("1");
        arguments[1]=NodeArgument.getNodeArgument("1");
        assertEquals(instance.evaluate(arguments), 15.0, 0.0);


        for (NodeFunction f : cop.getNodefunctions()) {
            if (f.id() == 2){
                System.out.println("Found f: "+f);
                instance = f.getFunction();
            }

        }
        System.out.println("Function selected:\n"+instance);

         args = new LinkedList<NodeVariable>();
        args.add(NodeVariable.getNodeVariable(1));
        args.add(NodeVariable.getNodeVariable(5));
        args.add(NodeVariable.getNodeVariable(2));
        args.add(NodeVariable.getNodeVariable(2));
        args.add(NodeVariable.getNodeVariable(13));

        instance.removeArgs(args);

        NodeArgument[] arguments2 = {
            NodeArgument.getNodeArgument("0")
        };

        assertEquals(instance.evaluate(arguments2), 8.0, 0.0);

        arguments2[0]=NodeArgument.getNodeArgument("1");

        assertEquals(instance.evaluate(arguments2), 2.0, 0.0);

    }