src/test/java/com/stijndepestel/geminio/JSONNamesTest.java
/**
     * Test to see if the JSONNames class cannot be instantiated.
     *
     * @throws NoSuchMethodException
     * @throws SecurityException
     * @throws InstantiationException
     * @throws IllegalAccessException
     * @throws IllegalArgumentException
     * @throws InvocationTargetException
     */
Test to see if the JSONNames class cannot be instantiated.
Test to see if the JSONNames class cannot be instantiated .
@Test(expected = Exception.class)
    public void jSONNamesNotConstructable() throws NoSuchMethodException,
            SecurityException, InstantiationException, IllegalAccessException,
            IllegalArgumentException, InvocationTargetException {
        final Constructor<JSONNames> constructor = JSONNames.class
                .getDeclaredConstructor();
        Assert.assertTrue("Constructor should be private",
                Modifier.isPrivate(constructor.getModifiers()));
        constructor.setAccessible(true);
        constructor.newInstance();
    }
@ Test ( expected = Exception . class ) public void jSONNamesNotConstructable ( ) throws NoSuchMethodException , SecurityException , InstantiationException , IllegalAccessException , IllegalArgumentException , InvocationTargetException { final Constructor < JSONNames > constructor = JSONNames . class . getDeclaredConstructor ( ) ; Assert . assertTrue ( "Constructor should be private" , Modifier . isPrivate ( constructor . getModifiers ( ) ) ) ; constructor . setAccessible ( true ) ; constructor . newInstance ( ) ; }
Test to see if the JSONNames class cannot be instantiated.
Test to see if the JSONNames class cannot be instantiated .