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