@Test
public void getFirstTypeArgument() throws Exception {

    assertThat(getFirstTypeArgument(A.class), is(nullValue()));
    Type type = Types.newParameterizedTypeWithOwner(TypesTest.class, A.class, B.class, C.class);
    assertThat(getFirstTypeArgument(type), is(Matchers.<Type>equalTo(B.class)));
}