package com.twitter.util;

import junit.framework.TestCase;

/**
 * Tests are not currently run for java, but for our purposes, if the test compiles at all, it's
 * a success.
 */
public class FutureTest extends TestCase {
  public void testFutureCast() {
    Future<String> f = Future$.MODULE$.value("23");
    Future<Integer> f2 = f.map(new Function<String, Integer>() {
      public Integer apply(String in) {
        return Integer.parseInt(in);
      }
    });
    assertEquals((int) f2.get(), 23);
  }
}

@@ -244,16 +244,19 @@
 tureCast
+Map
 () %7B%0A   
@@ -503,11 +503,347 @@
 23);%0A  %7D
+%0A%0A  public void testFutureCastFlatMap() %7B%0A    Future%3CString%3E f = Future$.MODULE$.value(%2223%22);%0A    Future%3CInteger%3E f2 = f.flatMap(new Function%3CString, Future%3CInteger%3E%3E() %7B%0A      public Future%3CInteger%3E apply(String in) %7B%0A        return Future$.MODULE$.value(Integer.parseInt(in));%0A      %7D%0A    %7D);%0A    assertEquals((int) f2.get(), 23);%0A  %7D
 %0A%7D%0A

add another test for flatMap, just in case