### Question:
ArrayPopulator extends Populator<Object> implements ICollectionPopulator<Object> { @Override public Object getPopulatedObject(final Field field, final Object fieldValue) { return getPopulatedObject(field.getType(), reflectionUtils.getArrayType(field), fieldValue, null); } ArrayPopulator(final BeanTransformer beanTransformer); @Override Object getPopulatedObject(final Field field, final Object fieldValue); @Override Object getPopulatedObject(final Class<?> fieldType, final Class<?> genericFieldType, final Object fieldValue, final Class<?> nestedGenericClass);  }### Answer:
@Test(dataProvider = "dataProvider") public void testGetPopulatedObjectWorksProperly(final Class<?> genericFieldType, final Object array) { when(transformer.transform(any(), eq(MixedToFooStaticField.class))).thenReturn(MIXED_TO_FOO_STATIC_FIELDS_OBJECTS); Object actual = underTest.getPopulatedObject(null, genericFieldType, array, null); if (genericFieldType == Character.class) { assertThat((char[]) actual).isEqualTo(array); } else if (genericFieldType == Integer.class) { assertThat((int[]) actual).isEqualTo(array); } else if (genericFieldType == Object.class) { assertThat((Object[]) actual).isEqualTo(array); } else if (genericFieldType == MixedToFooStaticField.class) { assertThat((Object[]) actual) .usingElementComparatorOnFields(NORMAL_FIELD) .isEqualTo(array); } else { assertThat(actual).isEqualTo(array); } }