@Test
  public void testBrooklynToQueensByTransit() throws Exception {
    try (LocalTestServerContext sc =
        new LocalTestServerContext("{\"routes\": [{}],\"status\": \"OK\"}")) {
      DirectionsApi.newRequest(sc.context)
          .origin("Brooklyn")
          .destination("Queens")
          .mode(TravelMode.TRANSIT)
          .await();

      sc.assertParamValue("Brooklyn", "origin");
      sc.assertParamValue("Queens", "destination");
      sc.assertParamValue(TravelMode.TRANSIT.toUrlValue(), "mode");
    }
  }
Brooklyn to Queens by public transport.

<p>{@code
http://maps.googleapis.com/maps/api/directions/json?origin=Brooklyn&destination=Queens&departure_time=1343641500&mode=transit}
src/test/java/com/google/maps/DirectionsApiTest.java