@@ -0,0 +1,2581 @@
+package fi.evident.apina.java.reader;%0A%0Aimport fi.evident.apina.java.model.JavaType;%0Aimport fi.evident.apina.java.model.MethodSignature;%0Aimport fi.evident.apina.java.model.QualifiedName;%0Aimport org.junit.Test;%0A%0Aimport static fi.evident.apina.java.reader.TypeParser.*;%0Aimport static java.util.Arrays.asList;%0Aimport static java.util.Collections.singletonList;%0Aimport static org.hamcrest.CoreMatchers.is;%0Aimport static org.junit.Assert.assertThat;%0A%0Apublic class TypeParserTest %7B%0A%0A    @Test%0A    public void parsingJavaTypesWithoutGenericSignatures() %7B%0A        assertThat(parseJavaType(%22I%22, null), is(simpleType(%22int%22)));%0A        assertThat(parseJavaType(%22V%22, null), is(simpleType(%22void%22)));%0A        assertThat(parseJavaType(%22Z%22, null), is(simpleType(%22boolean%22)));%0A        assertThat(parseJavaType(%22J%22, null), is(simpleType(%22long%22)));%0A%0A        assertThat(parseJavaType(%22Ljava/lang/Integer;%22, null), is(simpleType(%22java.lang.Integer%22)));%0A        assertThat(parseJavaType(%22Ljava/util/List;%22, null), is(simpleType(%22java.util.List%22)));%0A%0A        assertThat(parseJavaType(%22%5BI%22, null), is(simpleType(%22int%5B%5D%22)));%0A        assertThat(parseJavaType(%22%5B%5B%5B%5BI%22, null), is(simpleType(%22int%5B%5D%5B%5D%5B%5D%5B%5D%22)));%0A        assertThat(parseJavaType(%22%5BLjava/lang/Integer;%22, null), is(simpleType(%22java.lang.Integer%5B%5D%22)));%0A        assertThat(parseJavaType(%22%5B%5BLjava/lang/Integer;%22, null), is(simpleType(%22java.lang.Integer%5B%5D%5B%5D%22)));%0A    %7D%0A%0A    @Test%0A    public void parsingObjectType() %7B%0A        assertThat(parseObjectType(%22java/lang/Integer%22), is(new QualifiedName(%22java.lang.Integer%22)));%0A    %7D%0A%0A    @Test%0A    public void parsingNonGenericMethodSignaturesWithSingleParameter() %7B%0A        MethodSignature signature = parseMethodSignature(%22(Ljava/lang/Integer;)Ljava/lang/String;%22, null);%0A%0A        assertThat(signature.getReturnType(), is(simpleType(%22java.lang.String%22)));%0A        assertThat(signature.getArgumentTypes(), is(singletonList(simpleType(%22java.lang.Integer%22))));%0A    %7D%0A%0A    @Test%0A    public void parsingNonGenericMethodSignaturesWithMultipleParameters() %7B%0A        MethodSignature signature = parseMethodSignature(%0A                %22(Ljava/lang/Class;Ljava/util/function/Function;Ljava/lang/Object;)Ljava/lang/Enum;%22, null);%0A%0A        assertThat(signature.getReturnType(), is(simpleType(%22java.lang.Enum%22)));%0A        assertThat(signature.getArgumentTypes(), is(asList(%0A                simpleType(%22java.lang.Class%22), simpleType(%22java.util.function.Function%22), simpleType(%22java.lang.Object%22))));%0A    %7D%0A%0A    private static JavaType simpleType(String name) %7B%0A        return new JavaType(new QualifiedName(name));%0A    %7D%0A%7D%0A

Add tests for TypeParser