StandaloneHelper { static void checkContextPath(String contextPath) { if (StringUtils.isEmpty(contextPath)) { return; } if (!contextPath.startsWith("/")) { throw new IllegalArgumentException("A context path must start with a '/' character. " + " See https: } if (contextPath.endsWith("/")) { throw new IllegalArgumentException("A context path must not end with a '/' character. " + " See https: } }  static int findAvailablePort(int min, int max); static Class<? extends Standalone> resolveStandaloneClass(); static Standalone create(Class<? extends Standalone> standaloneClass); static InputStream openKeyStoreInput(URI uri); static KeyStore loadKeyStore(URI uri, char[] password); static SSLContext createSSLContext(
            URI keystoreUri, char[] keystorePassword,
            URI truststoreUri, char[] truststorePassword);  }
@Test public void checkContextPath() { StandaloneHelper.checkContextPath("/mycontext"); StandaloneHelper.checkContextPath("/mycontext/hello"); }
@Test(expected=IllegalArgumentException.class) public void contextPathMustStartWithForwardSlash() { StandaloneHelper.checkContextPath("mycontext"); }
@Test(expected=IllegalArgumentException.class) public void contextPathMayNotEndWithForwardSlash() { StandaloneHelper.checkContextPath("/mycontext/"); }