Created
November 13, 2013 02:33
-
-
Save jbcpollak/7442644 to your computer and use it in GitHub Desktop.
GeocodingFutureFactoryTest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AddressGeocodingFutureFactoryTest extends FutureFactoryTestBase { | |
@Test | |
public void testFuture() throws Exception { | |
GeocodingService geocodingService = mock(GeocodingService.class); | |
GeocodingFutureFactory gff = new GeocodingFutureFactory(); | |
gff.setExecutionContext(ec); | |
gff.setGeocodingService(geocodingService); | |
final Address addr = new Address(); | |
// the contents of addr are not necessary other than to verify the objects are the same | |
addr.setId(1394); | |
gff.makeFuture(addr); | |
// normally the Await function would be necessary, but we know we are running | |
// with the calling thread dispatcher here, so it isn't required. | |
verify(geocodingService).lookup(addr); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment