protected void checkServerViewForStatus(String projectName, String serverNameLabel) {
   ServersView serversView = new ServersView();
   serversView.open();
   Server server = serversView.getServer(serverNameLabel);
   ServerModule serverModule = server.getModule(new RegexMatcher(".*" + projectName + ".*"));
   ModuleLabel moduleLabel = serverModule.getLabel();
   ServerState moduleState = moduleLabel.getState();
   org.junit.Assert.assertTrue("Module has not been started!", moduleState == ServerState.STARTED);
 }
 public boolean test() {
   ServersView serversView = new ServersView();
   serversView.open();
   Server server = serversView.getServer(serverNameLabel);
   ServerModule serverModule = server.getModule(new RegexMatcher(".*" + projectName + ".*"));
   ModuleLabel moduleLabel = serverModule.getLabel();
   ServerState moduleState = moduleLabel.getState();
   return moduleState == ServerState.STARTED;
 }
 private void unDeployModule(String moduleName, Server server) {
   log.info("UNDEPLOYING MODULE" + moduleName + " ON SERVER " + server.getLabel());
   ServerModule serverModule = server.getModule(new RegexMatcher(".*" + moduleName + ".*"));
   serverModule.remove();
   new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG);
 }