### Question:
AbstractGroupsPayload { protected String[] convertToStringArray(final Payload payload, final String payloadMapKey) throws IllegalArgumentException { return extractNonNullValueFromMapPayload(payload, payloadMapKey, o -> convertToList(o)).stream() .map(STRING_CONVERTER).toArray(String[]::new); }   static final Function<Object, String> STRING_CONVERTER; }### Answer:
@Test public void testConvertToStringArray() { assertThatThrownBy(() -> subclass.convertToStringArray(makeStubMapPayload(MAP_KEY, null), MAP_KEY)) .isInstanceOf(NullPointerException.class) .hasMessageContaining(MAP_KEY); assertThat(subclass.convertToStringArray(makeStubMapPayload(MAP_KEY, singletonList("footest")), MAP_KEY)).isEqualTo(new String[]{"footest"}); assertThatThrownBy(() -> subclass.convertToStringArray(makeStubMapPayload(MAP_KEY, singletonList(42)), MAP_KEY)) .isInstanceOf(ClassCastException.class) .hasMessageContaining("42"); assertThat(subclass.convertToStringArray(makeStubMapPayload(MAP_KEY, singletonList(null)), MAP_KEY)).isEqualTo(new String[]{null}); assertThatThrownBy(() -> subclass.convertToStringArray(makeStubMapPayload("notexist", "footest"), MAP_KEY)) .isInstanceOf(IllegalArgumentException.class) .hasMessageContaining(MAP_KEY) .hasMessageContaining("notexist"); }