view src/org/RhinoTests/InvocableClassTest.java @ 322:cd4f00d779f7 draft

Added new test testGetResourceAsStreamPositiveTest into InvocableClassTest.
author Pavel Tisnovsky <ptisnovs@redhat.com>
date Tue, 25 Feb 2014 11:03:31 +0100
parents 087d4f0b3133
children bdfcaa390fb9
line wrap: on
line source

/*
  Rhino test framework

   Copyright (C) 2011, 2012, 2013  Red Hat

This file is part of IcedTea.

IcedTea is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

IcedTea is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with IcedTea; see the file COPYING.  If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.

Linking this library statically or dynamically with other modules is
making a combined work based on this library.  Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.

As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module.  An independent module is a module which is not derived from
or based on this library.  If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so.  If you do not wish to do so, delete this
exception statement from your version.
*/

package org.RhinoTests;

import java.util.Arrays;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.TreeMap;

import java.lang.annotation.Annotation;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable;

import javax.script.Invocable;
import javax.script.Invocable;
import javax.script.ScriptEngineManager;
import javax.script.ScriptEngine;



/**
 * Set of tests which check the API of Invocable interface using
 * Java reflection API.
 *
 * @author Pavel Tisnovsky
 */
public class InvocableClassTest extends BaseRhinoTest {

    /**
     * Object that represents the type of Invocable.
     */
    Class<?> invocableClass = null;

    @Override
    protected void setUp(String[] args) {
        // setup attribute used by tests
        this.invocableClass = Invocable.class;
    }

    @Override
    protected void tearDown() {
        // this block could be empty
        return;
    }

    /**
     * Test for method javax.script.Invocable.getClass().isAssignableFrom()
     */
    protected void testIsAssignableFrom() {
        assertTrue(this.invocableClass.isAssignableFrom(Invocable.class),
                "Method Invocable.getClass().isAssignableFrom() returns wrong value");
    }

    /**
     * Test for method javax.script.Invocable.getClass().isInstance()
     */
    protected void testIsInstance() {
        assertTrue(this.invocableClass.isInstance((new ScriptEngineManager().getEngineByName(Constants.EngineNames.ENGINE_NAME_JavaScript))),
                "Method Invocable.getClass().isInstance() returns wrong value");
    }

    /**
     * Test for method javax.script.Invocable.getClass().isInterface()
     */
    protected void testIsInterface() {
        assertTrue(this.invocableClass.isInterface(),
                "Method Invocable.getClass().isInterface() returns wrong value");
    }

    /**
     * Test for method javax.script.Invocable.getClass().isLocalClass()
     */
    protected void testIsLocalClass() {
        assertFalse(this.invocableClass.isLocalClass(),
                "Method Invocable.getClass().isLocalClass() returns wrong value");
    }

    /**
     * Test for method javax.script.Invocable.getClass().isMemberClass()
     */
    protected void testIsMemberClass() {
        assertFalse(this.invocableClass.isMemberClass(),
                "Method Invocable.getClass().isMemberClass() returns wrong value");
    }

    /**
     * Test for method javax.script.Invocable.getClass().isPrimitive()
     */
    protected void testIsPrimitive() {
        assertFalse(this.invocableClass.isPrimitive(),
                "Method Invocable.getClass().isPrimitive() returns wrong value");
    }

    /**
     * Test for method javax.script.Invocable.getClass().isSynthetic()
     */
    protected void testIsSynthetic() {
        assertFalse(this.invocableClass.isSynthetic(),
                "Method Invocable.getClass().isSynthetic() returns wrong value");
    }

    /**
     * Test for method javax.script.Invocable.getClass().isAnnotation()
     */
    protected void testIsAnnotation() {
        assertFalse(this.invocableClass.isAnnotation(),
                "Method Invocable.getClass().isAnnotation() returns wrong value");
    }

    /**
     * Test for method javax.script.Invocable.getClass().isAnnotationPresent()
     */
    protected void testIsAnnotationPresent() {
        assertFalse(this.invocableClass.isAnnotationPresent(java.lang.annotation.Annotation.class),
                "Method Invocable.getClass().isAnnotationPresent(java.lang.annotation.Annotation.class) returns wrong value");
        assertFalse(this.invocableClass.isAnnotationPresent(java.lang.annotation.Documented.class),
                "Method Invocable.getClass().isAnnotationPresent(java.lang.annotation.Documented.class) returns wrong value");
        assertFalse(this.invocableClass.isAnnotationPresent(java.lang.annotation.Inherited.class),
                "Method Invocable.getClass().isAnnotationPresent(java.lang.annotation.Inherited.class) returns wrong value");
        assertFalse(this.invocableClass.isAnnotationPresent(java.lang.annotation.Retention.class),
                "Method Invocable.getClass().isAnnotationPresent(java.lang.annotation.Retention.class) returns wrong value");
        assertFalse(this.invocableClass.isAnnotationPresent(java.lang.annotation.Target.class),
                "Method Invocable.getClass().isAnnotationPresent(java.lang.annotation.Target.class) returns wrong value");
        assertFalse(this.invocableClass.isAnnotationPresent(java.lang.Deprecated.class),
                "Method Invocable.getClass().isAnnotationPresent(java.lang.Deprecated.class) returns wrong value");
        assertFalse(this.invocableClass.isAnnotationPresent(java.lang.Override.class),
                "Method Invocable.getClass().isAnnotationPresent(java.lang.Override.class) returns wrong value");
        assertFalse(this.invocableClass.isAnnotationPresent(java.lang.SuppressWarnings.class),
                "Method Invocable.getClass().isAnnotationPresent(java.lang.SuppressWarnings.class) returns wrong value");
    }

    /**
     * Test for method javax.script.Invocable.getClass().isAnonymousClass()
     */
    protected void testIsAnonymousClass() {
        assertFalse(this.invocableClass.isAnonymousClass(),
                "Method Invocable.getClass().isAnonymousClass() returns wrong value");
    }

    /**
     * Test for method javax.script.Invocable.getClass().isArray()
     */
    protected void testIsArray() {
        assertFalse(this.invocableClass.isArray(),
                "Method Invocable.getClass().isArray() returns wrong value");
    }

    /**
     * Test for method javax.script.Invocable.getClass().isEnum()
     */
    protected void testIsEnum() {
        assertFalse(this.invocableClass.isEnum(),
                "Method Invocable.getClass().isEnum() returns wrong value");
    }

    /**
     * Test for method javax.script.Invocable.getClass().getInterfaces()
     */
    protected void testGetInterfaces() {
        List<Class<?>> interfaces = Arrays.asList(this.invocableClass.getInterfaces());
        assertTrue(interfaces.isEmpty(),
                "list of implemented interfaces should be empty");
    }

    /**
     * Test for method javax.script.Invocable.getClass().getModifiers()
     */
    protected void testGetModifiers() {
        int modifiers = this.invocableClass.getModifiers();
        assertTrue(Modifier.isPublic(modifiers),
                "Method Invocable.getClass().getModifiers() - isPublic modifier is set to a wrong value");
        assertFalse(Modifier.isPrivate(modifiers),
                "Method Invocable.getClass().getModifiers() - isPrivate modifier is set to a wrong value");
        assertFalse(Modifier.isProtected(modifiers),
                "Method Invocable.getClass().getModifiers() - isProtected modifier is set to a wrong value");
        assertTrue(Modifier.isAbstract(modifiers),
                "Method Invocable.getClass().getModifiers() - isAbstract modifier is set to a wrong value");
        assertFalse(Modifier.isFinal(modifiers),
                "Method Invocable.getClass().getModifiers() - isFinal modifier is set to a wrong value");
        assertTrue(Modifier.isInterface(modifiers),
                "Method Invocable.getClass().getModifiers() - isInterface modifier is set to a wrong value");
        assertFalse(Modifier.isNative(modifiers),
                "Method Invocable.getClass().getModifiers() - isNative modifier is set to a wrong value");
        assertFalse(Modifier.isStatic(modifiers),
                "Method Invocable.getClass().getModifiers() - isStatic modifier is set to a wrong value");
        assertFalse(Modifier.isStrict(modifiers),
                "Method Invocable.getClass().getModifiers() - isStrict modifier is set to a wrong value");
        assertFalse(Modifier.isSynchronized(modifiers),
                "Method Invocable.getClass().getModifiers() - isSynchronized modifier is set to a wrong value");
        assertFalse(Modifier.isTransient(modifiers),
                "Method Invocable.getClass().getModifiers() - isTransient modifier is set to a wrong value");
        assertFalse(Modifier.isVolatile(modifiers),
                "Method Invocable.getClass().getModifiers() - isVolatile modifier is set to a wrong value");
    }

    /**
     * Test for method javax.script.Invocable.getClass().getName()
     */
    protected void testGetName() {
        String name = this.invocableClass.getName();
        assertEquals(name, "javax.script.Invocable",
                "Method Invocable.getClass().getName() returns wrong value " + name);
    }

    /**
     * Test for method javax.script.Invocable.getClass().getPackage()
     */
    protected void testGetPackage() {
        Package p = this.invocableClass.getPackage();
        String packageName = p.getName();
        assertEquals(packageName, "javax.script",
                "Method Invocable.getClass().getPackage().getName() returns wrong value " + packageName);
    }

    /**
     * Test for method javax.script.Invocable.getClass().getSimpleName()
     */
    protected void testGetSimpleName() {
        String simpleName = this.invocableClass.getSimpleName();
        assertEquals(simpleName, "Invocable",
                "Method Invocable.getClass().getSimpleName() returns wrong value " + simpleName);
    }

    /**
     * Test for method javax.script.Invocable.getClass().getCanonicalName()
     */
    protected void testGetCanonicalName() {
        String canonicalName = this.invocableClass.getCanonicalName();
        assertEquals(canonicalName, "javax.script.Invocable",
                "Method javax.script.Invocable.getClass().getCanonicalName() returns wrong value " + canonicalName);
    }

    /**
     * Test for method javax.script.Invocable.getClass().getSuperclass()
     */
    protected void testGetSuperclass() {
        Class<?> superClass = this.invocableClass.getSuperclass();
        assertNull(superClass,
                "Method Invocable.getClass().getSuperclass() does not return null");
    }

    /**
     * Test for method javax.script.Invocable.getClass().getConstructors()
     */
    protected void testGetConstructors() {
        // map of constructors which should exists
        @SuppressWarnings("unused")
        Map<String, String> testedConstructors = null;
        Map<String, String> testedConstructors_jdk6 = new HashMap<String, String>();
        Map<String, String> testedConstructors_jdk7 = new HashMap<String, String>();
        Map<String, String> testedConstructors_jdk8 = new HashMap<String, String>();


        // get the right map containing constructor signatures
        switch (getJavaVersion()) {
            case 6:
                testedConstructors = testedConstructors_jdk6;
                break;
            case 7:
                testedConstructors = testedConstructors_jdk7;
                break;
            case 8:
                testedConstructors = testedConstructors_jdk8;
                break;
        }

        // get all constructors for this class
        Constructor<?>[] constructors = this.invocableClass.getConstructors();

        // basic check for a number of constructors
        assertEquals(constructors.length, 0, "no constructors should be set");

    }

    /**
     * Test for method javax.script.Invocable.getClass().getDeclaredConstructors()
     */
    protected void testGetDeclaredConstructors() {
        // map of constructors which should exists
        @SuppressWarnings("unused")
        Map<String, String> testedConstructors = null;
        Map<String, String> testedConstructors_jdk6 = new HashMap<String, String>();
        Map<String, String> testedConstructors_jdk7 = new HashMap<String, String>();
        Map<String, String> testedConstructors_jdk8 = new HashMap<String, String>();


        // get the right map containing constructor signatures
        switch (getJavaVersion()) {
            case 6:
                testedConstructors = testedConstructors_jdk6;
                break;
            case 7:
                testedConstructors = testedConstructors_jdk7;
                break;
            case 8:
                testedConstructors = testedConstructors_jdk8;
                break;
        }

        // get all declared constructors for this class
        Constructor<?>[] declaredConstructors = this.invocableClass.getDeclaredConstructors();

        // basic check for a number of declared constructors
        assertEquals(declaredConstructors.length, 0, "no constructors should be set");

    }

    /**
     * Test for method javax.script.Invocable.getClass().getConstructor()
     */
    protected void testGetConstructor() {
        // following constructors should exist
        Map<String, Class[]> constructorsThatShouldExist_jdk6 = new TreeMap<String, Class[]>();

        Map<String, Class[]> constructorsThatShouldExist_jdk7 = new TreeMap<String, Class[]>();

        Map<String, Class[]> constructorsThatShouldExist_jdk8 = new TreeMap<String, Class[]>();

        Map<String, Class[]> constructorsThatShouldExist = null;
        switch (getJavaVersion()) {
            case 6:
                constructorsThatShouldExist = constructorsThatShouldExist_jdk6;
                break;
            case 7:
                constructorsThatShouldExist = constructorsThatShouldExist_jdk7;
                break;
            case 8:
                constructorsThatShouldExist = constructorsThatShouldExist_jdk8;
                break;
        }

        // check if all required constructors really exist
        for (Map.Entry<String, Class[]> constructorThatShouldExists : constructorsThatShouldExist.entrySet()) {
            try {
                Constructor constructor = this.invocableClass.getConstructor(constructorThatShouldExists.getValue());
                assertNotNull(constructor,
                        "constructor " + constructorThatShouldExists.getKey() + " not found");
                String constructorName = constructor.getName();
                assertNotNull(constructorName,
                        "constructor " + constructorThatShouldExists.getKey() + " does not have name assigned");
                assertTrue(constructorName.equals(constructorThatShouldExists.getKey()),
                        "constructor " + constructorThatShouldExists.getKey() + " not found");
            }
            catch (Exception e) {
                e.printStackTrace();
                throw new AssertionError(e.getMessage());
            }
        }
    }

    /**
     * Test for method javax.script.Invocable.getClass().getDeclaredConstructor()
     */
    protected void testGetDeclaredConstructor() {
        // following constructors should exist
        Map<String, Class[]> constructorsThatShouldExist_jdk6 = new TreeMap<String, Class[]>();

        Map<String, Class[]> constructorsThatShouldExist_jdk7 = new TreeMap<String, Class[]>();

        Map<String, Class[]> constructorsThatShouldExist_jdk8 = new TreeMap<String, Class[]>();

        Map<String, Class[]> constructorsThatShouldExist = null;
        switch (getJavaVersion()) {
            case 6:
                constructorsThatShouldExist = constructorsThatShouldExist_jdk6;
                break;
            case 7:
                constructorsThatShouldExist = constructorsThatShouldExist_jdk7;
                break;
            case 8:
                constructorsThatShouldExist = constructorsThatShouldExist_jdk8;
                break;
        }

        // check if all required constructors really exist
        for (Map.Entry<String, Class[]> constructorThatShouldExists : constructorsThatShouldExist.entrySet()) {
            try {
                Constructor constructor = this.invocableClass.getDeclaredConstructor(constructorThatShouldExists.getValue());
                assertNotNull(constructor,
                        "constructor " + constructorThatShouldExists.getKey() + " not found");
                String constructorName = constructor.getName();
                assertNotNull(constructorName,
                        "constructor " + constructorThatShouldExists.getKey() + " does not have name assigned");
                assertTrue(constructorName.equals(constructorThatShouldExists.getKey()),
                        "constructor " + constructorThatShouldExists.getKey() + " not found");
            }
            catch (Exception e) {
                e.printStackTrace();
                throw new AssertionError(e.getMessage());
            }
        }
    }

    /**
     * Test for method javax.script.Invocable.getClass().getFields()
     */
    protected void testGetFields() {
        // following fields should exists
        final String[] fieldsThatShouldExist_jdk6 = {
        };
        final String[] fieldsThatShouldExist_jdk7 = {
        };
        final String[] fieldsThatShouldExist_jdk8 = {
        };

        // get the right array of field signatures
        String[] fieldsThatShouldExist = null;
        switch (getJavaVersion()) {
            case 6:
                fieldsThatShouldExist = fieldsThatShouldExist_jdk6;
                break;
            case 7:
                fieldsThatShouldExist = fieldsThatShouldExist_jdk7;
                break;
            case 8:
                fieldsThatShouldExist = fieldsThatShouldExist_jdk8;
                break;
        }

        // get all fields
        Field[] fields = this.invocableClass.getFields();
        // and transform the array into a list of field names
        List<String> fieldsAsString = new ArrayList<String>();
        for (Field field : fields) {
            fieldsAsString.add(field.toString());
        }
        // check if all required fields really exists
        for (String fieldThatShouldExists : fieldsThatShouldExist) {
            assertTrue(fieldsAsString.contains(fieldThatShouldExists),
                    "field " + fieldThatShouldExists + " not found");
        }
    }

    /**
     * Test for method javax.script.Invocable.getClass().getDeclaredFields()
     */
    protected void testGetDeclaredFields() {
        // following declared fields should exists
        final String[] declaredFieldsThatShouldExist_jdk6 = {
        };
        final String[] declaredFieldsThatShouldExist_jdk7 = {
        };
        final String[] declaredFieldsThatShouldExist_jdk8 = {
        };

        // get the right array of field signatures
        // following fields should be declared
        String[] declaredFieldsThatShouldExist = null;
        switch (getJavaVersion()) {
            case 6:
                declaredFieldsThatShouldExist = declaredFieldsThatShouldExist_jdk6;
                break;
            case 7:
                declaredFieldsThatShouldExist = declaredFieldsThatShouldExist_jdk7;
                break;
            case 8:
                declaredFieldsThatShouldExist = declaredFieldsThatShouldExist_jdk8;
                break;
        }

        // get all declared fields
        Field[] declaredFields = this.invocableClass.getDeclaredFields();
        // and transform the array into a list of field names
        List<String> declaredFieldsAsString = new ArrayList<String>();
        for (Field field : declaredFields) {
            declaredFieldsAsString.add(field.toString());
        }
        // check if all required fields really exists
        for (String declaredFieldThatShouldExists : declaredFieldsThatShouldExist) {
            assertTrue(declaredFieldsAsString.contains(declaredFieldThatShouldExists),
                    "field " + declaredFieldThatShouldExists + " not found");
        }
    }

    /**
     * Test for method javax.script.Invocable.getClass().getField()
     */
    protected void testGetField() {
        // following fields should exists
        final String[] fieldsThatShouldExist_jdk6 = {
        };
        final String[] fieldsThatShouldExist_jdk7 = {
        };
        final String[] fieldsThatShouldExist_jdk8 = {
        };

        String[] fieldsThatShouldExist = null;
        switch (getJavaVersion()) {
            case 6:
                fieldsThatShouldExist = fieldsThatShouldExist_jdk6;
                break;
            case 7:
                fieldsThatShouldExist = fieldsThatShouldExist_jdk7;
                break;
            case 8:
                fieldsThatShouldExist = fieldsThatShouldExist_jdk8;
                break;
        }

        // check if all required fields really exists
        for (String fieldThatShouldExists : fieldsThatShouldExist) {
            try {
                Field field = this.invocableClass.getField(fieldThatShouldExists);
                String fieldName = field.getName();
                assertTrue(fieldName.equals(fieldThatShouldExists),
                        "field " + fieldThatShouldExists + " not found");
            }
            catch (Exception e) {
                e.printStackTrace();
                throw new AssertionError(e.getMessage());
            }
        }
    }

    /**
     * Test for method javax.script.Invocable.getClass().getDeclaredField()
     */
    protected void testGetDeclaredField() {
        // following declared fields should exists
        final String[] declaredFieldsThatShouldExist_jdk6 = {
        };
        final String[] declaredFieldsThatShouldExist_jdk7 = {
        };
        final String[] declaredFieldsThatShouldExist_jdk8 = {
        };

        // get the right array of field signatures
        // following fields should be declared
        String[] declaredFieldsThatShouldExist = null;
        switch (getJavaVersion()) {
            case 6:
                declaredFieldsThatShouldExist = declaredFieldsThatShouldExist_jdk6;
                break;
            case 7:
                declaredFieldsThatShouldExist = declaredFieldsThatShouldExist_jdk7;
                break;
            case 8:
                declaredFieldsThatShouldExist = declaredFieldsThatShouldExist_jdk8;
                break;
        }

        // check if all required declared fields really exists
        for (String declaredFieldThatShouldExists : declaredFieldsThatShouldExist) {
            try {
                Field field = this.invocableClass.getDeclaredField(declaredFieldThatShouldExists);
                String fieldName = field.getName();
                assertTrue(fieldName.equals(declaredFieldThatShouldExists),
                        "field " + declaredFieldThatShouldExists + " not found");
            }
            catch (Exception e) {
                e.printStackTrace();
                throw new AssertionError(e.getMessage());
            }
        }
    }

    /**
     * Test for method javax.script.Invocable.getClass().getMethods()
     */
    protected void testGetMethods() {
        // following methods should be inherited
        final String[] methodsThatShouldExist_jdk6 = {
            "public abstract java.lang.Object javax.script.Invocable.getInterface(java.lang.Class)",
            "public abstract java.lang.Object javax.script.Invocable.getInterface(java.lang.Object,java.lang.Class)",
            "public abstract java.lang.Object javax.script.Invocable.invokeFunction(java.lang.String,java.lang.Object[]) throws javax.script.ScriptException,java.lang.NoSuchMethodException",
            "public abstract java.lang.Object javax.script.Invocable.invokeMethod(java.lang.Object,java.lang.String,java.lang.Object[]) throws javax.script.ScriptException,java.lang.NoSuchMethodException",
        };

        final String[] methodsThatShouldExist_jdk7 = {
            "public abstract java.lang.Object javax.script.Invocable.getInterface(java.lang.Class)",
            "public abstract java.lang.Object javax.script.Invocable.getInterface(java.lang.Object,java.lang.Class)",
            "public abstract java.lang.Object javax.script.Invocable.invokeFunction(java.lang.String,java.lang.Object[]) throws javax.script.ScriptException,java.lang.NoSuchMethodException",
            "public abstract java.lang.Object javax.script.Invocable.invokeMethod(java.lang.Object,java.lang.String,java.lang.Object[]) throws javax.script.ScriptException,java.lang.NoSuchMethodException",
        };

        final String[] methodsThatShouldExist_jdk8 = {
            "public abstract java.lang.Object javax.script.Invocable.getInterface(java.lang.Class)",
            "public abstract java.lang.Object javax.script.Invocable.getInterface(java.lang.Object,java.lang.Class)",
            "public abstract java.lang.Object javax.script.Invocable.invokeFunction(java.lang.String,java.lang.Object[]) throws javax.script.ScriptException,java.lang.NoSuchMethodException",
            "public abstract java.lang.Object javax.script.Invocable.invokeMethod(java.lang.Object,java.lang.String,java.lang.Object[]) throws javax.script.ScriptException,java.lang.NoSuchMethodException",
        };

        // get all inherited methods
        Method[] methods = this.invocableClass.getMethods();
        // and transform the array into a list of method names
        List<String> methodsAsString = new ArrayList<String>();
        for (Method method : methods) {
            methodsAsString.add(method.toString());
        }

        String[] methodsThatShouldExist = null;
        switch (getJavaVersion()) {
            case 6:
                methodsThatShouldExist = methodsThatShouldExist_jdk6;
                break;
            case 7:
                methodsThatShouldExist = methodsThatShouldExist_jdk7;
                break;
            case 8:
                methodsThatShouldExist = methodsThatShouldExist_jdk8;
                break;
        }

        // check if all required methods really exists
        for (String methodThatShouldExists : methodsThatShouldExist) {
            assertTrue(methodsAsString.contains(methodThatShouldExists),
                    "method " + methodThatShouldExists + " not found");
        }
    }

    /**
     * Test for method javax.script.Invocable.getClass().getDeclaredMethods()
     */
    protected void testGetDeclaredMethods() {
        // following methods should be declared
        final String[] declaredMethodsThatShouldExist_jdk6 = {
            "public abstract java.lang.Object javax.script.Invocable.getInterface(java.lang.Class)",
            "public abstract java.lang.Object javax.script.Invocable.getInterface(java.lang.Object,java.lang.Class)",
            "public abstract java.lang.Object javax.script.Invocable.invokeFunction(java.lang.String,java.lang.Object[]) throws javax.script.ScriptException,java.lang.NoSuchMethodException",
            "public abstract java.lang.Object javax.script.Invocable.invokeMethod(java.lang.Object,java.lang.String,java.lang.Object[]) throws javax.script.ScriptException,java.lang.NoSuchMethodException",
        };

        final String[] declaredMethodsThatShouldExist_jdk7 = {
            "public abstract java.lang.Object javax.script.Invocable.getInterface(java.lang.Class)",
            "public abstract java.lang.Object javax.script.Invocable.getInterface(java.lang.Object,java.lang.Class)",
            "public abstract java.lang.Object javax.script.Invocable.invokeFunction(java.lang.String,java.lang.Object[]) throws javax.script.ScriptException,java.lang.NoSuchMethodException",
            "public abstract java.lang.Object javax.script.Invocable.invokeMethod(java.lang.Object,java.lang.String,java.lang.Object[]) throws javax.script.ScriptException,java.lang.NoSuchMethodException",
        };

        final String[] declaredMethodsThatShouldExist_jdk8 = {
            "public abstract java.lang.Object javax.script.Invocable.getInterface(java.lang.Class)",
            "public abstract java.lang.Object javax.script.Invocable.getInterface(java.lang.Object,java.lang.Class)",
            "public abstract java.lang.Object javax.script.Invocable.invokeFunction(java.lang.String,java.lang.Object[]) throws javax.script.ScriptException,java.lang.NoSuchMethodException",
            "public abstract java.lang.Object javax.script.Invocable.invokeMethod(java.lang.Object,java.lang.String,java.lang.Object[]) throws javax.script.ScriptException,java.lang.NoSuchMethodException",
        };

        // get all declared methods
        Method[] declaredMethods = this.invocableClass.getDeclaredMethods();
        // and transform the array into a list of method names
        List<String> methodsAsString = new ArrayList<String>();
        for (Method method : declaredMethods) {
            methodsAsString.add(method.toString());
        }

        String[] declaredMethodsThatShouldExist = null;
        switch (getJavaVersion()) {
            case 6:
                declaredMethodsThatShouldExist = declaredMethodsThatShouldExist_jdk6;
                break;
            case 7:
                declaredMethodsThatShouldExist = declaredMethodsThatShouldExist_jdk7;
                break;
            case 8:
                declaredMethodsThatShouldExist = declaredMethodsThatShouldExist_jdk8;
                break;
        }

        // check if all required methods really exists
        for (String methodThatShouldExists : declaredMethodsThatShouldExist) {
            assertTrue(methodsAsString.contains(methodThatShouldExists),
                    "declared method " + methodThatShouldExists + " not found");
        }
    }

    /**
     * Test for method javax.script.Invocable.getClass().getMethod()
     */
    protected void testGetMethod() throws ClassNotFoundException {
        // following methods should exist
        Map<String, Class[]> methodsThatShouldExist_jdk6 = new TreeMap<String, Class[]>();
        methodsThatShouldExist_jdk6.put("invokeMethod", new Class[] {java.lang.Object.class, java.lang.String.class, Class.forName("[Ljava.lang.Object;")});
        methodsThatShouldExist_jdk6.put("invokeFunction", new Class[] {java.lang.String.class, Class.forName("[Ljava.lang.Object;")});
        methodsThatShouldExist_jdk6.put("getInterface", new Class[] {java.lang.Class.class});
        methodsThatShouldExist_jdk6.put("getInterface", new Class[] {java.lang.Object.class, java.lang.Class.class});

        Map<String, Class[]> methodsThatShouldExist_jdk7 = new TreeMap<String, Class[]>();
        methodsThatShouldExist_jdk7.put("invokeFunction", new Class[] {java.lang.String.class, Class.forName("[Ljava.lang.Object;")});
        methodsThatShouldExist_jdk7.put("getInterface", new Class[] {java.lang.Object.class, java.lang.Class.class});
        methodsThatShouldExist_jdk7.put("getInterface", new Class[] {java.lang.Class.class});
        methodsThatShouldExist_jdk7.put("invokeMethod", new Class[] {java.lang.Object.class, java.lang.String.class, Class.forName("[Ljava.lang.Object;")});

        Map<String, Class[]> methodsThatShouldExist_jdk8 = new TreeMap<String, Class[]>();
        methodsThatShouldExist_jdk8.put("invokeMethod", new Class[] {java.lang.Object.class, java.lang.String.class, Class.forName("[Ljava.lang.Object;")});
        methodsThatShouldExist_jdk8.put("invokeFunction", new Class[] {java.lang.String.class, Class.forName("[Ljava.lang.Object;")});
        methodsThatShouldExist_jdk8.put("getInterface", new Class[] {java.lang.Object.class, java.lang.Class.class});
        methodsThatShouldExist_jdk8.put("getInterface", new Class[] {java.lang.Class.class});

        Map<String, Class[]> methodsThatShouldExist = null;
        switch (getJavaVersion()) {
            case 6:
                methodsThatShouldExist = methodsThatShouldExist_jdk6;
                break;
            case 7:
                methodsThatShouldExist = methodsThatShouldExist_jdk7;
                break;
            case 8:
                methodsThatShouldExist = methodsThatShouldExist_jdk8;
                break;
        }

        // check if all required methods really exist
        for (Map.Entry<String, Class[]> methodThatShouldExists : methodsThatShouldExist.entrySet()) {
            try {
                Method method = this.invocableClass.getMethod(methodThatShouldExists.getKey(), methodThatShouldExists.getValue());
                assertNotNull(method,
                        "method " + methodThatShouldExists.getKey() + " not found");
                String methodName = method.getName();
                assertNotNull(methodName,
                        "method " + methodThatShouldExists.getKey() + " does not have name assigned");
                assertTrue(methodName.equals(methodThatShouldExists.getKey()),
                        "method " + methodThatShouldExists.getKey() + " not found");
            }
            catch (Exception e) {
                e.printStackTrace();
                throw new AssertionError(e.getMessage());
            }
        }
    }

    /**
     * Test for method javax.script.Invocable.getClass().getDeclaredMethod()
     */
    protected void testGetDeclaredMethod() throws ClassNotFoundException {
        // following methods should exist
        Map<String, Class[]> methodsThatShouldExist_jdk6 = new TreeMap<String, Class[]>();
        methodsThatShouldExist_jdk6.put("invokeMethod", new Class[] {java.lang.Object.class, java.lang.String.class, Class.forName("[Ljava.lang.Object;")});
        methodsThatShouldExist_jdk6.put("invokeFunction", new Class[] {java.lang.String.class, Class.forName("[Ljava.lang.Object;")});
        methodsThatShouldExist_jdk6.put("getInterface", new Class[] {java.lang.Class.class});
        methodsThatShouldExist_jdk6.put("getInterface", new Class[] {java.lang.Object.class, java.lang.Class.class});

        Map<String, Class[]> methodsThatShouldExist_jdk7 = new TreeMap<String, Class[]>();
        methodsThatShouldExist_jdk7.put("invokeFunction", new Class[] {java.lang.String.class, Class.forName("[Ljava.lang.Object;")});
        methodsThatShouldExist_jdk7.put("getInterface", new Class[] {java.lang.Object.class, java.lang.Class.class});
        methodsThatShouldExist_jdk7.put("getInterface", new Class[] {java.lang.Class.class});
        methodsThatShouldExist_jdk7.put("invokeMethod", new Class[] {java.lang.Object.class, java.lang.String.class, Class.forName("[Ljava.lang.Object;")});

        Map<String, Class[]> methodsThatShouldExist_jdk8 = new TreeMap<String, Class[]>();
        methodsThatShouldExist_jdk8.put("invokeMethod", new Class[] {java.lang.Object.class, java.lang.String.class, Class.forName("[Ljava.lang.Object;")});
        methodsThatShouldExist_jdk8.put("invokeFunction", new Class[] {java.lang.String.class, Class.forName("[Ljava.lang.Object;")});
        methodsThatShouldExist_jdk8.put("getInterface", new Class[] {java.lang.Object.class, java.lang.Class.class});
        methodsThatShouldExist_jdk8.put("getInterface", new Class[] {java.lang.Class.class});

        Map<String, Class[]> methodsThatShouldExist = null;
        switch (getJavaVersion()) {
            case 6:
                methodsThatShouldExist = methodsThatShouldExist_jdk6;
                break;
            case 7:
                methodsThatShouldExist = methodsThatShouldExist_jdk7;
                break;
            case 8:
                methodsThatShouldExist = methodsThatShouldExist_jdk8;
                break;
        }

        // check if all required methods really exist
        for (Map.Entry<String, Class[]> methodThatShouldExists : methodsThatShouldExist.entrySet()) {
            try {
                Method method = this.invocableClass.getDeclaredMethod(methodThatShouldExists.getKey(), methodThatShouldExists.getValue());
                assertNotNull(method,
                        "method " + methodThatShouldExists.getKey() + " not found");
                String methodName = method.getName();
                assertNotNull(methodName,
                        "method " + methodThatShouldExists.getKey() + " does not have name assigned");
                assertTrue(methodName.equals(methodThatShouldExists.getKey()),
                        "method " + methodThatShouldExists.getKey() + " not found");
            }
            catch (Exception e) {
                e.printStackTrace();
                throw new AssertionError(e.getMessage());
            }
        }
    }

    /**
     * Test for method javax.script.Invocable.getClass().getAnnotations()
     */
    protected void testGetAnnotations() {
        // following annotations should be provided
        final String[] annotationsThatShouldExists_jdk6 = {
            // this should be really empty
        };

        final String[] annotationsThatShouldExists_jdk7 = {
            // this should be really empty
        };

        final String[] annotationsThatShouldExists_jdk8 = {
            // this should be really empty
        };

        // get all annotations
        Annotation[] annotations = this.invocableClass.getAnnotations();
        // and transform the array into a list of annotation names
        List<String> annotationsAsString = new ArrayList<String>();
        for (Annotation annotation : annotations) {
            annotationsAsString.add(annotation.toString());
        }

        String[] annotationsThatShouldExists = null;
        switch (getJavaVersion()) {
            case 6:
                annotationsThatShouldExists = annotationsThatShouldExists_jdk6;
                break;
            case 7:
                annotationsThatShouldExists = annotationsThatShouldExists_jdk7;
                break;
            case 8:
                annotationsThatShouldExists = annotationsThatShouldExists_jdk8;
                break;
        }

        // check if all required annotations really exists
        for (String annotationThatShouldExists : annotationsThatShouldExists) {
            assertTrue(annotationsAsString.contains(annotationThatShouldExists),
                    "annotation " + annotationThatShouldExists + " not found");
        }
    }

    /**
     * Test for method javax.script.Invocable.getClass().getDeclaredAnnotations()
     */
    protected void testGetDeclaredAnnotations() {
        // following annotations should be provided
        final String[] annotationsThatShouldExists_jdk6 = {
        };

        final String[] annotationsThatShouldExists_jdk7 = {
        };

        final String[] annotationsThatShouldExists_jdk8 = {
        };

        // get all annotations
        Annotation[] annotations = this.invocableClass.getDeclaredAnnotations();
        // and transform the array into a list of annotation names
        List<String> annotationsAsString = new ArrayList<String>();
        for (Annotation annotation : annotations) {
            annotationsAsString.add(annotation.toString());
        }

        String[] annotationsThatShouldExists = null;
        switch (getJavaVersion()) {
            case 6:
                annotationsThatShouldExists = annotationsThatShouldExists_jdk6;
                break;
            case 7:
                annotationsThatShouldExists = annotationsThatShouldExists_jdk7;
                break;
            case 8:
                annotationsThatShouldExists = annotationsThatShouldExists_jdk8;
                break;
        }

        // check if all required annotations really exists
        for (String annotationThatShouldExists : annotationsThatShouldExists) {
            assertTrue(annotationsAsString.contains(annotationThatShouldExists),
                    "annotation " + annotationThatShouldExists + " not found");
        }
    }

    /**
     * Test for method javax.script.Invocable.getClass().getAnnotation()
     */
    protected void testGetAnnotation() {
        Annotation annotation;
        annotation = this.invocableClass.getAnnotation(java.lang.annotation.Annotation.class);
        assertNull(annotation, "annotation java.lang.annotation.Annotation should not be returned");
        annotation = this.invocableClass.getAnnotation(java.lang.annotation.Documented.class);
        assertNull(annotation, "annotation java.lang.annotation.Documented should not be returned");
        annotation = this.invocableClass.getAnnotation(java.lang.annotation.Inherited.class);
        assertNull(annotation, "annotation java.lang.annotation.Inherited should not be returned");
        annotation = this.invocableClass.getAnnotation(java.lang.annotation.Retention.class);
        assertNull(annotation, "annotation java.lang.annotation.Retention should not be returned");
        annotation = this.invocableClass.getAnnotation(java.lang.annotation.Target.class);
        assertNull(annotation, "annotation java.lang.annotation.Target should not be returned");
        annotation = this.invocableClass.getAnnotation(java.lang.Deprecated.class);
        assertNull(annotation, "annotation java.lang.Deprecated should not be returned");
        annotation = this.invocableClass.getAnnotation(java.lang.Override.class);
        assertNull(annotation, "annotation java.lang.Override should not be returned");
        annotation = this.invocableClass.getAnnotation(java.lang.SuppressWarnings.class);
        assertNull(annotation, "annotation java.lang.SuppressWarnings should not be returned");
    }

    /**
     * Test for method javax.script.Invocable.getClass().getComponentType()
     */
    protected void testGetComponentType() {
        Class<?> cls = this.invocableClass.getComponentType();
        assertNull(cls, "getComponentType() should returns null");
    }

    /**
     * Test for method javax.script.Invocable.getClass().getClasses()
     */
    protected void testGetClasses() {
        Class<?>[] cls = this.invocableClass.getClasses();
        assertNotNull(cls, "getClasses() returns null");
        assertEquals(cls.length, 0, "getClasses() returns wrong value!");
    }

    /**
     * Test for method javax.script.Invocable.getClass().getDeclaredClasses()
     */
    protected void testGetDeclaredClasses() {
        Class<?>[] cls = this.invocableClass.getDeclaredClasses();
        assertNotNull(cls, "getDeclaredClasses() returns null");
        assertEquals(cls.length, 0, "getDeclaredClasses() returns wrong value!");
    }

    /**
     * Test for method javax.script.Invocable.getClass().getDeclaringClass()
     */
    protected void testGetDeclaringClass() {
        Class<?> cls = this.invocableClass.getDeclaringClass();
        assertNull(cls, "getDeclaringClass() does not return null");
    }

    /**
     * Test for method javax.script.Invocable.getClass().getEnclosingClass()
     */
    protected void testGetEnclosingClass() {
        Class<?> cls = this.invocableClass.getEnclosingClass();
        assertNull(cls, "getEnclosingClass() does not return null");
    }

    /**
     * Test for method javax.script.Invocable.getClass().getEnclosingConstructor()
     */
    protected void testGetEnclosingConstructor() {
        Constructor<?> cons = this.invocableClass.getEnclosingConstructor();
        assertNull(cons, "getEnclosingConstructor() does not return null");
    }

    /**
     * Test for method javax.script.Invocable.getClass().getEnclosingMethod()
     */
    protected void testGetEnclosingMethod() {
        Method m = this.invocableClass.getEnclosingMethod();
        assertNull(m, "getEnclosingMethod() does not return null");
    }

    /**
     * Test for method javax.script.Invocable.getClass().getGenericSuperclass()
     */
    protected void testGetGenericSuperclass() {
        Type genericSuperclass = this.invocableClass.getGenericSuperclass();
        assertNull(genericSuperclass, "getGenericSuperclass() does not return null");
    }

    /**
     * Test for method javax.script.Invocable.getClass().getGenericInterfaces()
     */
    protected void testGetGenericInterfaces() {
        // array of interface names that should exists
        final String[] genericInterfaceNames_jdk6 = {
        };

        final String[] genericInterfaceNames_jdk7 = {
        };

        final String[] genericInterfaceNames_jdk8 = {
        };

        // get the right array of field signatures
        String[] genericInterfaceNames = null;
        switch (getJavaVersion()) {
            case 6:
                genericInterfaceNames = genericInterfaceNames_jdk6;
                break;
            case 7:
                genericInterfaceNames = genericInterfaceNames_jdk7;
                break;
            case 8:
                genericInterfaceNames = genericInterfaceNames_jdk8;
                break;
        }

        // get all generic interfaces
        Type[] genericInterfaces = this.invocableClass.getGenericInterfaces();
        assertNotNull(genericInterfaces, "getGenericInterfaces() returns null");
        assertEquals(0, genericInterfaces.length, "array of wrong size returned by getGenericInterfaces " + genericInterfaces.length);

        // and transform the array into a list of field names
        List<String> interfacesAsString = new ArrayList<String>();
        for (Type genericInterface : genericInterfaces) {
            interfacesAsString.add(genericInterface.toString());
        }

        // check if all required interfaces really exists
        for (String interfaceThatShouldExists : genericInterfaceNames) {
            assertTrue(interfacesAsString.contains(interfaceThatShouldExists),
                    "interface " + interfaceThatShouldExists + " not found");
        }
    }

    /**
     * Test for method javax.script.Invocable.getClass().getEnumConstants()
     */
    protected void testGetEnumConstants() {
        Object[] enumConstants = this.invocableClass.getEnumConstants();
        assertNull(enumConstants, "getEnumConstants() does not return null");
    }

    /**
     * Test for method javax.script.Invocable.getClass().getTypeParameters()
     */
    protected void testGetTypeParameters() {
        TypeVariable<?>[] typeParameters = this.invocableClass.getTypeParameters();
        assertNotNull(typeParameters, "getTypeParameters() return null");
        assertEquals(0, typeParameters.length, "array of wrong size returned by getTypeParameters() " + typeParameters.length);
    }

    /**
     * Test for method javax.script.Invocable.getClass().getSigners()
     */
    protected void testGetSigners() {
        Object[] signers = this.invocableClass.getSigners();
        assertNull(signers, "getSigners() does not return null");
    }

    /**
     * Test for method javax.script.Invocable.getClass().desiredAssertionStatus()
     */
    protected void testDesiredAssertionStatus() {
        assertFalse(this.invocableClass.desiredAssertionStatus(),
                "Method Invocable.getClass().desiredAssertionStatus() returns wrong value");
    }

    /**
     * Test for method javax.script.Invocable.getClass().asSubclass()
     */
    protected void testAsSubclass() {
        try {
            this.invocableClass.asSubclass(invocableClass);
        }
        catch (Exception e) {
            e.printStackTrace();
            throw new AssertionError(e.getMessage());
        }

        try {
            this.invocableClass.asSubclass(java.lang.Void.class);
            throw new AssertionError("Class.asSubclass(java.lang.Void.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.lang.Number.class);
            throw new AssertionError("Class.asSubclass(java.lang.Number.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.lang.Byte.class);
            throw new AssertionError("Class.asSubclass(java.lang.Byte.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.lang.Double.class);
            throw new AssertionError("Class.asSubclass(java.lang.Double.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.lang.Float.class);
            throw new AssertionError("Class.asSubclass(java.lang.Float.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.lang.Integer.class);
            throw new AssertionError("Class.asSubclass(java.lang.Integer.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.lang.Long.class);
            throw new AssertionError("Class.asSubclass(java.lang.Long.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.lang.Short.class);
            throw new AssertionError("Class.asSubclass(java.lang.Short.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.lang.String.class);
            throw new AssertionError("Class.asSubclass(java.lang.String.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.lang.StringBuffer.class);
            throw new AssertionError("Class.asSubclass(java.lang.StringBuffer.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.lang.StringBuilder.class);
            throw new AssertionError("Class.asSubclass(java.lang.StringBuilder.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.applet.Applet.class);
            throw new AssertionError("Class.asSubclass(java.applet.Applet.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.awt.Button.class);
            throw new AssertionError("Class.asSubclass(java.awt.Button.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.awt.Canvas.class);
            throw new AssertionError("Class.asSubclass(java.awt.Canvas.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.awt.CardLayout.class);
            throw new AssertionError("Class.asSubclass(java.awt.CardLayout.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.awt.Checkbox.class);
            throw new AssertionError("Class.asSubclass(java.awt.Checkbox.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.awt.Choice.class);
            throw new AssertionError("Class.asSubclass(java.awt.Choice.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.awt.Color.class);
            throw new AssertionError("Class.asSubclass(java.awt.Color.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.awt.Font.class);
            throw new AssertionError("Class.asSubclass(java.awt.Font.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.awt.Image.class);
            throw new AssertionError("Class.asSubclass(java.awt.Image.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.awt.Label.class);
            throw new AssertionError("Class.asSubclass(java.awt.Label.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.awt.List.class);
            throw new AssertionError("Class.asSubclass(java.awt.List.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.awt.Menu.class);
            throw new AssertionError("Class.asSubclass(java.awt.Menu.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.io.File.class);
            throw new AssertionError("Class.asSubclass(java.io.File.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.io.Reader.class);
            throw new AssertionError("Class.asSubclass(java.io.Reader.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.io.Writer.class);
            throw new AssertionError("Class.asSubclass(java.io.Writer.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.io.StringReader.class);
            throw new AssertionError("Class.asSubclass(java.io.StringReader.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.io.StringWriter.class);
            throw new AssertionError("Class.asSubclass(java.io.StringWriter.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.io.InputStream.class);
            throw new AssertionError("Class.asSubclass(java.io.InputStream.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.io.OutputStream.class);
            throw new AssertionError("Class.asSubclass(java.io.OutputStream.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.io.ObjectInputStream.class);
            throw new AssertionError("Class.asSubclass(java.io.ObjectInputStream.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.io.ObjectOutputStream.class);
            throw new AssertionError("Class.asSubclass(java.io.ObjectOutputStream.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.math.BigDecimal.class);
            throw new AssertionError("Class.asSubclass(java.math.BigDecimal.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.math.BigInteger.class);
            throw new AssertionError("Class.asSubclass(java.math.BigInteger.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.util.ArrayList.class);
            throw new AssertionError("Class.asSubclass(java.util.ArrayList.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.util.LinkedList.class);
            throw new AssertionError("Class.asSubclass(java.util.LinkedList.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.util.HashMap.class);
            throw new AssertionError("Class.asSubclass(java.util.HashMap.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.util.TreeMap.class);
            throw new AssertionError("Class.asSubclass(java.util.TreeMap.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.util.HashSet.class);
            throw new AssertionError("Class.asSubclass(java.util.HashSet.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.util.TreeSet.class);
            throw new AssertionError("Class.asSubclass(java.util.TreeSet.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.util.Stack.class);
            throw new AssertionError("Class.asSubclass(java.util.Stack.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.util.Vector.class);
            throw new AssertionError("Class.asSubclass(java.util.Vector.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.util.Hashtable.class);
            throw new AssertionError("Class.asSubclass(java.util.Hashtable.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.util.Calendar.class);
            throw new AssertionError("Class.asSubclass(java.util.Calendar.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.util.Arrays.class);
            throw new AssertionError("Class.asSubclass(java.util.Arrays.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(java.util.Collections.class);
            throw new AssertionError("Class.asSubclass(java.util.Collections.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(javax.swing.JPanel.class);
            throw new AssertionError("Class.asSubclass(javax.swing.JPanel.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(javax.swing.JColorChooser.class);
            throw new AssertionError("Class.asSubclass(javax.swing.JColorChooser.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(javax.swing.JScrollBar.class);
            throw new AssertionError("Class.asSubclass(javax.swing.JScrollBar.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.asSubclass(javax.swing.JSlider.class);
            throw new AssertionError("Class.asSubclass(javax.swing.JSlider.class) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

    }

    /**
     * Test for method javax.script.Invocable.getClass().cast()
     */
    protected void testCast() {
        try {
            this.invocableClass.cast(new Object());
            throw new AssertionError("Class.cast(new Object()) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.cast(new Object().getClass());
            throw new AssertionError("Class.cast(new Object().getClass()) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.cast(new String());
            throw new AssertionError("Class.cast(new String()) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.cast(Boolean.valueOf(true));
            throw new AssertionError("Class.cast(Boolean.valueOf(true)) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.cast(Boolean.valueOf(false));
            throw new AssertionError("Class.cast(Boolean.valueOf(false)) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.cast(Byte.valueOf((byte)42));
            throw new AssertionError("Class.cast(Byte.valueOf((byte)42)) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.cast(Short.valueOf((short)42));
            throw new AssertionError("Class.cast(Short.valueOf((short)42)) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.cast(Integer.valueOf(42));
            throw new AssertionError("Class.cast(Integer.valueOf(42)) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.cast(Long.valueOf(42L));
            throw new AssertionError("Class.cast(Long.valueOf(42L)) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.cast(Float.valueOf(42f));
            throw new AssertionError("Class.cast(Float.valueOf(42f)) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.cast(Double.valueOf(42.));
            throw new AssertionError("Class.cast(Double.valueOf(42.)) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.cast(new Throwable());
            throw new AssertionError("Class.cast(new Throwable()) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.cast(new RuntimeException());
            throw new AssertionError("Class.cast(new RuntimeException()) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.cast(new Error());
            throw new AssertionError("Class.cast(new Error()) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.cast(new java.lang.String());
            throw new AssertionError("Class.cast(new java.lang.String()) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.cast(new java.lang.StringBuffer());
            throw new AssertionError("Class.cast(new java.lang.StringBuffer()) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.cast(new java.lang.StringBuilder());
            throw new AssertionError("Class.cast(new java.lang.StringBuilder()) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.cast(java.awt.Color.black);
            throw new AssertionError("Class.cast(java.awt.Color.black) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.cast(new java.awt.Frame());
            throw new AssertionError("Class.cast(new java.awt.Frame()) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.cast(new java.awt.Frame(new String()));
            throw new AssertionError("Class.cast(new java.awt.Frame(new String())) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.cast(new javax.swing.JLabel());
            throw new AssertionError("Class.cast(new javax.swing.JLabel()) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.cast(new javax.swing.JLabel(new String()));
            throw new AssertionError("Class.cast(new javax.swing.JLabel(new String())) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

        try {
            this.invocableClass.cast(new javax.swing.JPanel());
            throw new AssertionError("Class.cast(new javax.swing.JPanel()) does not throw any exception");
        }
        catch (Exception e) {
            // expected exception
        }

    }

    /**
     * Test for method javax.script.Invocable.getClass().newInstance()
     */
    protected void testNewInstance() {
        try {
            Object o = this.invocableClass.newInstance();
            throw new AssertionError("Class.newInstance() does not throw any exception");
        }
        catch (InstantiationException e) {
            // expected exception
        }
        catch (IllegalAccessException e) {
            // expected exception
        }

    }

    /**
     * Test for method javax.script.Invocable.getClass().getResourceNPETest()
     */
    protected void testGetResourceNPETest() {
        try {
            Object resource = this.invocableClass.getResource(null);
            throw new AssertionError("NullPointerException expected!");
        }
        catch (NullPointerException e) {
            //This is OK OK
        }
    }

    /**
     * Test for method javax.script.Invocable.getClass().getResourceNegativeTest()
     */
    protected void testGetResourceNegativeTest() {
        Object resource = this.invocableClass.getResource("unknown");
        assertNull(resource, "getResource() does not return null");
    }

    /**
     * Test for method javax.script.Invocable.getClass().getResourcePositiveTest()
     */
    protected void testGetResourcePositiveTest() {
        Object resource;
        resource = this.invocableClass.getResource("/org/RhinoTests/AbstractScriptEngineClassTest.class");
        assertNotNull(resource, "getResource(\"/org/RhinoTests/AbstractScriptEngineClassTest.class\") returns null");
        resource = this.invocableClass.getResource("/org/RhinoTests/BaseRhinoTest.class");
        assertNotNull(resource, "getResource(\"/org/RhinoTests/BaseRhinoTest.class\") returns null");
        resource = this.invocableClass.getResource("/org/RhinoTests/BindingsClassTest.class");
        assertNotNull(resource, "getResource(\"/org/RhinoTests/BindingsClassTest.class\") returns null");
        resource = this.invocableClass.getResource("/org/RhinoTests/BindingsTest.class");
        assertNotNull(resource, "getResource(\"/org/RhinoTests/BindingsTest.class\") returns null");
        resource = this.invocableClass.getResource("/org/RhinoTests/CompilableClassTest.class");
        assertNotNull(resource, "getResource(\"/org/RhinoTests/CompilableClassTest.class\") returns null");
        resource = this.invocableClass.getResource("/org/RhinoTests/CompilableTest.class");
        assertNotNull(resource, "getResource(\"/org/RhinoTests/CompilableTest.class\") returns null");
        resource = this.invocableClass.getResource("/org/RhinoTests/CompiledScriptClassTest.class");
        assertNotNull(resource, "getResource(\"/org/RhinoTests/CompiledScriptClassTest.class\") returns null");
        resource = this.invocableClass.getResource("/org/RhinoTests/CompiledScriptTest.class");
        assertNotNull(resource, "getResource(\"/org/RhinoTests/CompiledScriptTest.class\") returns null");
        resource = this.invocableClass.getResource("/org/RhinoTests/Constants.class");
        assertNotNull(resource, "getResource(\"/org/RhinoTests/Constants.class\") returns null");
        resource = this.invocableClass.getResource("/org/RhinoTests/InvocableClassTest.class");
        assertNotNull(resource, "getResource(\"/org/RhinoTests/InvocableClassTest.class\") returns null");
        resource = this.invocableClass.getResource("/org/RhinoTests/InvocableTest.class");
        assertNotNull(resource, "getResource(\"/org/RhinoTests/InvocableTest.class\") returns null");
        resource = this.invocableClass.getResource("/org/RhinoTests/JavaScriptSnippets.class");
        assertNotNull(resource, "getResource(\"/org/RhinoTests/JavaScriptSnippets.class\") returns null");
        resource = this.invocableClass.getResource("/org/RhinoTests/JavaScriptsTest.class");
        assertNotNull(resource, "getResource(\"/org/RhinoTests/JavaScriptsTest.class\") returns null");
        resource = this.invocableClass.getResource("/org/RhinoTests/ScriptContextClassTest.class");
        assertNotNull(resource, "getResource(\"/org/RhinoTests/ScriptContextClassTest.class\") returns null");
        resource = this.invocableClass.getResource("/org/RhinoTests/ScriptContextTest.class");
        assertNotNull(resource, "getResource(\"/org/RhinoTests/ScriptContextTest.class\") returns null");
        resource = this.invocableClass.getResource("/org/RhinoTests/ScriptEngineClassTest.class");
        assertNotNull(resource, "getResource(\"/org/RhinoTests/ScriptEngineClassTest.class\") returns null");
        resource = this.invocableClass.getResource("/org/RhinoTests/ScriptEngineFactoryClassTest.class");
        assertNotNull(resource, "getResource(\"/org/RhinoTests/ScriptEngineFactoryClassTest.class\") returns null");
        resource = this.invocableClass.getResource("/org/RhinoTests/ScriptEngineFactoryTest.class");
        assertNotNull(resource, "getResource(\"/org/RhinoTests/ScriptEngineFactoryTest.class\") returns null");
        resource = this.invocableClass.getResource("/org/RhinoTests/ScriptEngineManagerClassTest.class");
        assertNotNull(resource, "getResource(\"/org/RhinoTests/ScriptEngineManagerClassTest.class\") returns null");
        resource = this.invocableClass.getResource("/org/RhinoTests/ScriptEngineManagerTest.class");
        assertNotNull(resource, "getResource(\"/org/RhinoTests/ScriptEngineManagerTest.class\") returns null");
        resource = this.invocableClass.getResource("/org/RhinoTests/ScriptEngineTest.class");
        assertNotNull(resource, "getResource(\"/org/RhinoTests/ScriptEngineTest.class\") returns null");
        resource = this.invocableClass.getResource("/org/RhinoTests/ScriptExceptionClassTest.class");
        assertNotNull(resource, "getResource(\"/org/RhinoTests/ScriptExceptionClassTest.class\") returns null");
        resource = this.invocableClass.getResource("/org/RhinoTests/ScriptExceptionTest.class");
        assertNotNull(resource, "getResource(\"/org/RhinoTests/ScriptExceptionTest.class\") returns null");
        resource = this.invocableClass.getResource("/org/RhinoTests/SimpleBindingsClassTest.class");
        assertNotNull(resource, "getResource(\"/org/RhinoTests/SimpleBindingsClassTest.class\") returns null");
        resource = this.invocableClass.getResource("/org/RhinoTests/SimpleBindingsTest.class");
        assertNotNull(resource, "getResource(\"/org/RhinoTests/SimpleBindingsTest.class\") returns null");
        resource = this.invocableClass.getResource("/org/RhinoTests/SimpleScriptContextClassTest.class");
        assertNotNull(resource, "getResource(\"/org/RhinoTests/SimpleScriptContextClassTest.class\") returns null");
        resource = this.invocableClass.getResource("/org/RhinoTests/SimpleScriptContextTest.class");
        assertNotNull(resource, "getResource(\"/org/RhinoTests/SimpleScriptContextTest.class\") returns null");
    }

    /**
     * Test for method javax.script.Invocable.getClass().getResourceAsStreamNPETest()
     */
    protected void testGetResourceAsStreamNPETest() {
        try {
            Object resource = this.invocableClass.getResourceAsStream(null);
            throw new AssertionError("NullPointerException expected!");
        }
        catch (NullPointerException e) {
            //This is OK OK
        }
    }

    /**
     * Test for method javax.script.Invocable.getClass().getResourceAsStreamNegativeTest()
     */
    protected void testGetResourceAsStreamNegativeTest() {
        Object stream = null;
        stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/AbstractScriptEngineClassTest.class");
        assertNotNull(stream, "getAsStreamResource(\"/org/RhinoTests/AbstractScriptEngineClassTest.class\") returns null");
        stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/BaseRhinoTest.class");
        assertNotNull(stream, "getAsStreamResource(\"/org/RhinoTests/BaseRhinoTest.class\") returns null");
        stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/BindingsClassTest.class");
        assertNotNull(stream, "getAsStreamResource(\"/org/RhinoTests/BindingsClassTest.class\") returns null");
        stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/BindingsTest.class");
        assertNotNull(stream, "getAsStreamResource(\"/org/RhinoTests/BindingsTest.class\") returns null");
        stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/CompilableClassTest.class");
        assertNotNull(stream, "getAsStreamResource(\"/org/RhinoTests/CompilableClassTest.class\") returns null");
        stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/CompilableTest.class");
        assertNotNull(stream, "getAsStreamResource(\"/org/RhinoTests/CompilableTest.class\") returns null");
        stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/CompiledScriptClassTest.class");
        assertNotNull(stream, "getAsStreamResource(\"/org/RhinoTests/CompiledScriptClassTest.class\") returns null");
        stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/CompiledScriptTest.class");
        assertNotNull(stream, "getAsStreamResource(\"/org/RhinoTests/CompiledScriptTest.class\") returns null");
        stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/Constants.class");
        assertNotNull(stream, "getAsStreamResource(\"/org/RhinoTests/Constants.class\") returns null");
        stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/InvocableClassTest.class");
        assertNotNull(stream, "getAsStreamResource(\"/org/RhinoTests/InvocableClassTest.class\") returns null");
        stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/InvocableTest.class");
        assertNotNull(stream, "getAsStreamResource(\"/org/RhinoTests/InvocableTest.class\") returns null");
        stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/JavaScriptSnippets.class");
        assertNotNull(stream, "getAsStreamResource(\"/org/RhinoTests/JavaScriptSnippets.class\") returns null");
        stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/JavaScriptsTest.class");
        assertNotNull(stream, "getAsStreamResource(\"/org/RhinoTests/JavaScriptsTest.class\") returns null");
        stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/ScriptContextClassTest.class");
        assertNotNull(stream, "getAsStreamResource(\"/org/RhinoTests/ScriptContextClassTest.class\") returns null");
        stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/ScriptContextTest.class");
        assertNotNull(stream, "getAsStreamResource(\"/org/RhinoTests/ScriptContextTest.class\") returns null");
        stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/ScriptEngineClassTest.class");
        assertNotNull(stream, "getAsStreamResource(\"/org/RhinoTests/ScriptEngineClassTest.class\") returns null");
        stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/ScriptEngineFactoryClassTest.class");
        assertNotNull(stream, "getAsStreamResource(\"/org/RhinoTests/ScriptEngineFactoryClassTest.class\") returns null");
        stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/ScriptEngineFactoryTest.class");
        assertNotNull(stream, "getAsStreamResource(\"/org/RhinoTests/ScriptEngineFactoryTest.class\") returns null");
        stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/ScriptEngineManagerClassTest.class");
        assertNotNull(stream, "getAsStreamResource(\"/org/RhinoTests/ScriptEngineManagerClassTest.class\") returns null");
        stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/ScriptEngineManagerTest.class");
        assertNotNull(stream, "getAsStreamResource(\"/org/RhinoTests/ScriptEngineManagerTest.class\") returns null");
        stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/ScriptEngineTest.class");
        assertNotNull(stream, "getAsStreamResource(\"/org/RhinoTests/ScriptEngineTest.class\") returns null");
        stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/ScriptExceptionClassTest.class");
        assertNotNull(stream, "getAsStreamResource(\"/org/RhinoTests/ScriptExceptionClassTest.class\") returns null");
        stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/ScriptExceptionTest.class");
        assertNotNull(stream, "getAsStreamResource(\"/org/RhinoTests/ScriptExceptionTest.class\") returns null");
        stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/SimpleBindingsClassTest.class");
        assertNotNull(stream, "getAsStreamResource(\"/org/RhinoTests/SimpleBindingsClassTest.class\") returns null");
        stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/SimpleBindingsTest.class");
        assertNotNull(stream, "getAsStreamResource(\"/org/RhinoTests/SimpleBindingsTest.class\") returns null");
        stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/SimpleScriptContextClassTest.class");
        assertNotNull(stream, "getAsStreamResource(\"/org/RhinoTests/SimpleScriptContextClassTest.class\") returns null");
        stream = this.invocableClass.getResourceAsStream("/org/RhinoTests/SimpleScriptContextTest.class");
        assertNotNull(stream, "getAsStreamResource(\"/org/RhinoTests/SimpleScriptContextTest.class\") returns null");
    }

    /**
     * Test for instanceof operator applied to a class javax.script.Invocable
     */
    @SuppressWarnings("cast")
    protected void testInstanceOf() {
        // tested object
        Object o = (Invocable)(new ScriptEngineManager().getEngineByName(Constants.EngineNames.ENGINE_NAME_JavaScript));

        // basic check of instanceof operator
        assertTrue(o instanceof Invocable, "instanceof Invocable is wrongly evaluated to false");

        // check operator instanceof against all superclasses
        assertTrue(o instanceof Object, "instanceof Object is wrongly evaluated to false");
    }

    /**
     * Entry point to this test case.
     *
     * @param args parameters passed from command line
     */
    public static void main(String[] args) {
        new InvocableClassTest().doTests(args);
    }
}