// Path: kawala-converters/src/main/java/com/kaching/platform/converters/Converter.java
// public interface Converter<T> extends ToString<T>, FromString<T> {
// }


import static java.util.Arrays.asList;
import static junit.framework.Assert.fail;
import static org.junit.Assert.assertEquals;
import java.lang.reflect.Type;
import java.util.List;
import java.util.Map;
import org.junit.Ignore;
import org.junit.Test;
import com.google.inject.TypeLiteral;
import com.kaching.platform.converters.Converter;
    for (int i = 0; i < 3; i++) {
      assertEquals(
          asList(String.class, Double.class, Integer.class).get(i),
          Unification.getActualTypeArgument(
              MultipleInterfaces.class, ManyTypeParams.class, i));
    }
  }

  static class MultipleInterfaces
      implements TopLevel<Type>, ManyTypeParams<String, Double, Integer> {}

  @Test
  public void implementsMultipleInterfacesSomeWithNoParametrization() throws Exception {
    for (int i = 0; i < 3; i++) {
      assertEquals(
          asList(String.class, Double.class, Integer.class).get(i),
          Unification.getActualTypeArgument(
              MultipleInterfacesSomeWithNoParametrization.class, ManyTypeParams.class, i));
    }
  }

  @SuppressWarnings("rawtypes")
  static class MultipleInterfacesSomeWithNoParametrization
      implements TopLevel, ManyTypeParams<String, Double, Integer> {}

  @Test
  public void listOfIntConverter() throws Exception {
    assertEquals(
        new TypeLiteral<List<Integer>>() {}.getType(),
        Unification.getActualTypeArgument(
// Path: kawala-converters/src/main/java/com/kaching/platform/converters/Converter.java
// public interface Converter<T> extends ToString<T>, FromString<T> {
// }


// Path: kawala-common-tests/src/test/java/com/kaching/platform/common/types/UnificationTest.java
import static java.util.Arrays.asList;
import static junit.framework.Assert.fail;
import static org.junit.Assert.assertEquals;
import java.lang.reflect.Type;
import java.util.List;
import java.util.Map;
import org.junit.Ignore;
import org.junit.Test;
import com.google.inject.TypeLiteral;
import com.kaching.platform.converters.Converter;

    for (int i = 0; i < 3; i++) {
      assertEquals(
          asList(String.class, Double.class, Integer.class).get(i),
          Unification.getActualTypeArgument(
              MultipleInterfaces.class, ManyTypeParams.class, i));
    }
  }

  static class MultipleInterfaces
      implements TopLevel<Type>, ManyTypeParams<String, Double, Integer> {}

  @Test
  public void implementsMultipleInterfacesSomeWithNoParametrization() throws Exception {
    for (int i = 0; i < 3; i++) {
      assertEquals(
          asList(String.class, Double.class, Integer.class).get(i),
          Unification.getActualTypeArgument(
              MultipleInterfacesSomeWithNoParametrization.class, ManyTypeParams.class, i));
    }
  }

  @SuppressWarnings("rawtypes")
  static class MultipleInterfacesSomeWithNoParametrization
      implements TopLevel, ManyTypeParams<String, Double, Integer> {}

  @Test
  public void listOfIntConverter() throws Exception {
    assertEquals(
        new TypeLiteral<List<Integer>>() {}.getType(),
        Unification.getActualTypeArgument(
            ListOfIntConverter.class, Converter.class, 0));