@Test public void testPrivateConstructor() { JunitHelper.testPrivateConstructor(JunitHelper.class); JunitHelper.testPrivateConstructor(ToNotAllocate.class); }
public static final void testPrivateConstructor(Class<?> clasz) { Constructor<?> c; try { c = clasz.getDeclaredConstructor(); c.setAccessible(true); c.newInstance(); } catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | UnsupportedOperationException e) { SysErrLogger.FAKE_LOGGER.ignoreLog(e); } }
JunitHelper extends ExternalResource { public static final void testPrivateConstructor(Class<?> clasz) { Constructor<?> c; try { c = clasz.getDeclaredConstructor(); c.setAccessible(true); c.newInstance(); } catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | UnsupportedOperationException e) { SysErrLogger.FAKE_LOGGER.ignoreLog(e); } } }
JunitHelper extends ExternalResource { public static final void testPrivateConstructor(Class<?> clasz) { Constructor<?> c; try { c = clasz.getDeclaredConstructor(); c.setAccessible(true); c.newInstance(); } catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | UnsupportedOperationException e) { SysErrLogger.FAKE_LOGGER.ignoreLog(e); } } private  JunitHelper(); }
JunitHelper extends ExternalResource { public static final void testPrivateConstructor(Class<?> clasz) { Constructor<?> c; try { c = clasz.getDeclaredConstructor(); c.setAccessible(true); c.newInstance(); } catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | UnsupportedOperationException e) { SysErrLogger.FAKE_LOGGER.ignoreLog(e); } } private  JunitHelper(); static final JunitHelper getInstance(); final synchronized int findAvailablePort(); final synchronized int findAvailablePort(String environmentVariable); final synchronized void releasePort(int port); final boolean isListeningOn(int port); final boolean isListeningOn(String host, int port); static final long consumeInputStream(InputStream inputStream); static final long consumeInputStreamPerByte(InputStream inputStream); static final void awaitFullGc(); static final void setJettyPortSystemProperty(String environmentVariable, int port); static final void unsetJettyPortSystemProperty(); static final void testPrivateConstructor(Class<?> clasz); }
JunitHelper extends ExternalResource { public static final void testPrivateConstructor(Class<?> clasz) { Constructor<?> c; try { c = clasz.getDeclaredConstructor(); c.setAccessible(true); c.newInstance(); } catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | UnsupportedOperationException e) { SysErrLogger.FAKE_LOGGER.ignoreLog(e); } } private  JunitHelper(); static final JunitHelper getInstance(); final synchronized int findAvailablePort(); final synchronized int findAvailablePort(String environmentVariable); final synchronized void releasePort(int port); final boolean isListeningOn(int port); final boolean isListeningOn(String host, int port); static final long consumeInputStream(InputStream inputStream); static final long consumeInputStreamPerByte(InputStream inputStream); static final void awaitFullGc(); static final void setJettyPortSystemProperty(String environmentVariable, int port); static final void unsetJettyPortSystemProperty(); static final void testPrivateConstructor(Class<?> clasz); static final int MIN_PORT; static final String PARAMETER_JETTY_SERVER_PORT_ADMIN; }