@Test @SuppressWarnings("unchecked") public void testIsNotAvailable() throws IOException { when(executor.execute("vagrant", "global-status")).thenThrow(IOException.class); assertThat(strategy.isAvailable(), is(false)); }
@Override public boolean isAvailable() { try { executor.execute("vagrant", "global-status"); return true; } catch (IOException e) { logger.debug("Vagrant is not available", e); return false; } }
VagrantStrategy implements ClusterStrategy { @Override public boolean isAvailable() { try { executor.execute("vagrant", "global-status"); return true; } catch (IOException e) { logger.debug("Vagrant is not available", e); return false; } } }
VagrantStrategy implements ClusterStrategy { @Override public boolean isAvailable() { try { executor.execute("vagrant", "global-status"); return true; } catch (IOException e) { logger.debug("Vagrant is not available", e); return false; } } protected  VagrantStrategy(); }
VagrantStrategy implements ClusterStrategy { @Override public boolean isAvailable() { try { executor.execute("vagrant", "global-status"); return true; } catch (IOException e) { logger.debug("Vagrant is not available", e); return false; } } protected  VagrantStrategy(); @Override boolean isAvailable(); @Override Node createNode(Cluster cluster); @Override NodeStatus getNodeStatus(Node node); @Override void startNode(Node node); @Override void stopNode(Node node); @Override void destroyNode(Node node); SshConfig getSshConfig(Node node); }
VagrantStrategy implements ClusterStrategy { @Override public boolean isAvailable() { try { executor.execute("vagrant", "global-status"); return true; } catch (IOException e) { logger.debug("Vagrant is not available", e); return false; } } protected  VagrantStrategy(); @Override boolean isAvailable(); @Override Node createNode(Cluster cluster); @Override NodeStatus getNodeStatus(Node node); @Override void startNode(Node node); @Override void stopNode(Node node); @Override void destroyNode(Node node); SshConfig getSshConfig(Node node); static final String NAME; }