@Test public void extractValueWithoutEndTag() { assertEquals("0.479/1.583/4.943/1.823", extractValue(SUN_OS_COMMAND_OUTPUT, "round-trip (ms) min/avg/max/stddev = ")); }
public static String extractValue(String output, String key) { String value = EMPTY_STRING; int startIndex = output.indexOf(key); if (startIndex >= 0) { value = output.substring(startIndex + key.length()); } return value; }
CommandOutputParser { public static String extractValue(String output, String key) { String value = EMPTY_STRING; int startIndex = output.indexOf(key); if (startIndex >= 0) { value = output.substring(startIndex + key.length()); } return value; } }
CommandOutputParser { public static String extractValue(String output, String key) { String value = EMPTY_STRING; int startIndex = output.indexOf(key); if (startIndex >= 0) { value = output.substring(startIndex + key.length()); } return value; }  }
CommandOutputParser { public static String extractValue(String output, String key) { String value = EMPTY_STRING; int startIndex = output.indexOf(key); if (startIndex >= 0) { value = output.substring(startIndex + key.length()); } return value; }  static String extractValue(String output, String key); static String extractValue(String output, String key, String endTag); }
CommandOutputParser { public static String extractValue(String output, String key) { String value = EMPTY_STRING; int startIndex = output.indexOf(key); if (startIndex >= 0) { value = output.substring(startIndex + key.length()); } return value; }  static String extractValue(String output, String key); static String extractValue(String output, String key, String endTag);  }