@SuppressWarnings("unchecked") @Test(expected = UnsupportedOperationException.class) public void testIsAvailableDoesNotSwallowRuntimeExceptions() throws IOException { when(executor.execute("vagrant", "global-status")) .thenThrow(UnsupportedOperationException.class); strategy.isAvailable(); }
@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; }