@Test
public void testInferWithGenerics() {

  Class<?>[] classes = getTypeArguments(VertexResolver.class,
      DefaultVertexResolver.class);
  assertEquals(3, classes.length);
  assertEquals(WritableComparable.class, classes[0]);
  assertEquals(Writable.class, classes[1]);
  assertEquals(Writable.class, classes[2]);
  classes = getTypeArguments(VertexIdFactory.class,
      DefaultVertexIdFactory.class);
  assertEquals(1, classes.length);
  assertEquals(WritableComparable.class, classes[0]);
  classes = getTypeArguments(VertexValueFactory.class,
      DefaultVertexValueFactory.class);
  assertEquals(1, classes.length);
  assertEquals(Writable.class, classes[0]);
  classes = getTypeArguments(EdgeValueFactory.class,
      DefaultEdgeValueFactory.class);
  assertEquals(1, classes.length);
  assertEquals(Writable.class, classes[0]);
  classes = getTypeArguments(MessageValueFactory.class,
      DefaultMessageValueFactory.class);
  assertEquals(1, classes.length);
  assertEquals(Writable.class, classes[0]);
  classes = getTypeArguments(OutEdges.class, ByteArrayEdges.class);
  assertEquals(2, classes.length);
  assertEquals(WritableComparable.class, classes[0]);
  assertEquals(Writable.class, classes[1]);
}