public static String getCurrentWeather(String location) {
    if (location.equals("Boston")) {
      return "snowing";
    } else if (location.equals("Vancouver")) {
      return "raining";
    } else {
      return "sunny";
    }
  }
Callable function getCurrentWeather for testing automatic function calling.
java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/it/ITChatSessionIntegrationTest.java