@Test public void testOverrides() throws Exception { VersionCommand command = new VersionCommand(); int rc = command.run(null, out, null, Collections.<String>emptyList()); assertThat(rc, is(0)); assertThat(outBytes.toString(), startsWith("Apache Whirr ")); assertThat(outBytes.toString(), containsString("jclouds")); }
@Override public int run(InputStream in, PrintStream out, PrintStream err, List<String> args) throws Exception { InputStream input = getClass().getResourceAsStream("/version-banner.txt"); if (input == null) { err.printf("Cannot determine version number\n"); return -1; } out.write(IOUtils.toByteArray(input)); out.println("jclouds " + JcloudsVersion.get().toString()); return 0; }
VersionCommand extends Command { @Override public int run(InputStream in, PrintStream out, PrintStream err, List<String> args) throws Exception { InputStream input = getClass().getResourceAsStream("/version-banner.txt"); if (input == null) { err.printf("Cannot determine version number\n"); return -1; } out.write(IOUtils.toByteArray(input)); out.println("jclouds " + JcloudsVersion.get().toString()); return 0; } }
VersionCommand extends Command { @Override public int run(InputStream in, PrintStream out, PrintStream err, List<String> args) throws Exception { InputStream input = getClass().getResourceAsStream("/version-banner.txt"); if (input == null) { err.printf("Cannot determine version number\n"); return -1; } out.write(IOUtils.toByteArray(input)); out.println("jclouds " + JcloudsVersion.get().toString()); return 0; } VersionCommand(); }
VersionCommand extends Command { @Override public int run(InputStream in, PrintStream out, PrintStream err, List<String> args) throws Exception { InputStream input = getClass().getResourceAsStream("/version-banner.txt"); if (input == null) { err.printf("Cannot determine version number\n"); return -1; } out.write(IOUtils.toByteArray(input)); out.println("jclouds " + JcloudsVersion.get().toString()); return 0; } VersionCommand(); @Override int run(InputStream in, PrintStream out, PrintStream err,
      List<String> args); @Override void printUsage(PrintStream stream); }
VersionCommand extends Command { @Override public int run(InputStream in, PrintStream out, PrintStream err, List<String> args) throws Exception { InputStream input = getClass().getResourceAsStream("/version-banner.txt"); if (input == null) { err.printf("Cannot determine version number\n"); return -1; } out.write(IOUtils.toByteArray(input)); out.println("jclouds " + JcloudsVersion.get().toString()); return 0; } VersionCommand(); @Override int run(InputStream in, PrintStream out, PrintStream err,
      List<String> args); @Override void printUsage(PrintStream stream);  }