TypeNames { @Nonnull public static TypeName unbox(@Nonnull TypeName source) { try { return source.unbox(); } catch (UnsupportedOperationException e) { return source; } } private  TypeNames(); @Nonnull static TypeName unbox(@Nonnull TypeName source);  }
@Test public void unboxShouldUnboxBoxedType() throws Exception { final TypeName actual = TypeNames.unbox(TypeName.get(Integer.class)); assertThat(actual) .isEqualTo(TypeName.INT); }
@Test public void unboxShouldNotUnboxPrimitiveType() throws Exception { final TypeName actual = TypeNames.unbox(TypeName.get(int.class)); assertThat(actual) .isEqualTo(TypeName.INT); }
@Test public void unboxShouldNotUnboxNonUnboxableType() throws Exception { final TypeName actual = TypeNames.unbox(TypeName.get(String.class)); assertThat(actual) .isEqualTo(TypeName.get(String.class)); }