### Question:
TableMapping extends ParameterMapping { public Class<?> getDestinationType() { return this.destinationType; } TableMapping(final Class<?> fieldType,
                        final Class<?> associatedType,
                        final String sapName,
                        final String javaName,
                        final StructureMapping componentParameter,
                        final Class<? extends Converter<?, ?>> converterClass); Class<?> getDestinationType(); StructureMapping getComponentParameter(); Class<?> getFieldType(); @Override ParamType getParamType(); @Override Object getUnconvertedValueToJava(final Object fieldMapCollection, final ConverterCache converterCache); @Override @Generated("") boolean equals(final Object o); @Override @Generated("") int hashCode();  }### Answer:
@Test public void destinationTypeIsArrayListByDefaultWhenFieldTypeIsList() { tableMapping = new TableMapping(List.class, Object.class, "sapName", "javaName", structureMapping, null); Class<?> destinationType = tableMapping.getDestinationType(); assertThat(destinationType).isSameAs(ArrayList.class); }
@Test public void destinationTypeIsHashSetByDefaultWhenFieldTypeIsSet() { tableMapping = new TableMapping(Set.class, Object.class, "sapName", "javaName", structureMapping, null); Class<?> destinationType = tableMapping.getDestinationType(); assertThat(destinationType).isSameAs(HashSet.class); }
@Test public void destinationTypeIsArrayListByDefaultWhenFieldTypeIsCollection() { tableMapping = new TableMapping(Collection.class, Object.class, "sapName", "javaName", structureMapping, null); Class<?> destinationType = tableMapping.getDestinationType(); assertThat(destinationType).isSameAs(ArrayList.class); }
@Test public void destinationTypeIsSameAsFieldTypeWhenFieldTypeIsConcreteCollection() { tableMapping = new TableMapping(TreeSet.class, Object.class, "sapName", "javaName", structureMapping, null); Class<?> destinationType = tableMapping.getDestinationType(); assertThat(destinationType).isSameAs(TreeSet.class); }
@Test public void destinationTypeIsArrayListWhenFieldTypeIsArray() { tableMapping = new TableMapping(Object[].class, Object.class, "sapName", "javaName", structureMapping, null); Class<?> destinationType = tableMapping.getDestinationType(); assertThat(destinationType).isSameAs(ArrayList.class); }
@Test public void destinationTypeIsSameAsFieldTypeWhenFieldHasConverter() { tableMapping = new TableMapping(Boolean.class, Boolean.class, "sapName", "javaName", structureMapping, BooleanConverter.class); Class<?> destinationType = tableMapping.getDestinationType(); assertThat(destinationType).isSameAs(Boolean.class); }