@BeforeClass public static void startServer() throws URISyntaxException { CRYPTOR.randomizeMasterKey(); SERVER.start(); SERVLET = SERVER.createServlet( TMP_VAULT.toPath(), CRYPTOR, new ArrayList<String>(), new ArrayList<String>(), "JUnitTestVault"); SERVLET.start(); VAULT_BASE_URI = new URI("http", SERVLET.getServletUri().getSchemeSpecificPart() + "/", null); Assert.assertTrue(SERVLET.isRunning()); Assert.assertNotNull(VAULT_BASE_URI); }
@AfterClass public static void stopServer() { SERVLET.stop(); SERVER.stop(); FileUtils.deleteQuietly(TMP_VAULT); }