### Question:
SolidityFunctionWrapper extends Generator { static TypeName getNativeType(TypeName typeName) { if (typeName instanceof ParameterizedTypeName) { return getNativeType((ParameterizedTypeName) typeName); } String simpleName = ((ClassName) typeName).simpleName(); if (simpleName.equals(Address.class.getSimpleName())) { return TypeName.get(String.class); } else if (simpleName.startsWith("Uint")) { return TypeName.get(BigInteger.class); } else if (simpleName.startsWith("Int")) { return TypeName.get(BigInteger.class); } else if (simpleName.equals(Utf8String.class.getSimpleName())) { return TypeName.get(String.class); } else if (simpleName.startsWith("Bytes")) { return TypeName.get(byte[].class); } else if (simpleName.equals(DynamicBytes.class.getSimpleName())) { return TypeName.get(byte[].class); } else if (simpleName.equals(Bool.class.getSimpleName())) { return TypeName.get(Boolean.class); } else { throw new UnsupportedOperationException( "Unsupported type: " + typeName + ", no native type mapping exists."); } } SolidityFunctionWrapper(boolean useNativeJavaTypes); @SuppressWarnings("unchecked") void generateJavaFiles(
            String contractName, String bin, String abi, String destinationDir,
            String basePackageName);  }### Answer:
@Test public void testGetNativeType() { assertThat(getNativeType(TypeName.get(Address.class)), equalTo(TypeName.get(String.class))); assertThat(getNativeType(TypeName.get(Uint256.class)), equalTo(TypeName.get(BigInteger.class))); assertThat(getNativeType(TypeName.get(Int256.class)), equalTo(TypeName.get(BigInteger.class))); assertThat(getNativeType(TypeName.get(Utf8String.class)), equalTo(TypeName.get(String.class))); assertThat(getNativeType(TypeName.get(Bool.class)), equalTo(TypeName.get(Boolean.class))); assertThat(getNativeType(TypeName.get(Bytes32.class)), equalTo(TypeName.get(byte[].class))); assertThat(getNativeType(TypeName.get(DynamicBytes.class)), equalTo(TypeName.get(byte[].class))); }
@Test public void testGetNativeTypeParameterized() { assertThat(getNativeType( ParameterizedTypeName.get( ClassName.get(DynamicArray.class), TypeName.get(Address.class))), equalTo(ParameterizedTypeName.get( ClassName.get(List.class), TypeName.get(String.class)))); }
@Test(expected = UnsupportedOperationException.class) public void testGetNativeTypeInvalid() { getNativeType(TypeName.get(BigInteger.class)); }