public static String arrayAwareToString(Object o) {
        final String arrayString = Arrays.deepToString(new Object[] {o});
        return arrayString.substring(1, arrayString.length() - 1);
    }
@Test
    void testArrayAwareToString() {
        assertThat(StringUtils.arrayAwareToString(null)).isEqualTo("null");

        assertThat(StringUtils.arrayAwareToString(DayOfWeek.MONDAY)).isEqualTo("MONDAY");

        assertThat(StringUtils.arrayAwareToString(new int[] {1, 2, 3})).isEqualTo("[1, 2, 3]");

        assertThat(StringUtils.arrayAwareToString(new byte[][] {{4, 5, 6}, null, {}}))
                .isEqualTo("[[4, 5, 6], null, []]");

        assertThat(
                        StringUtils.arrayAwareToString(
                                new Object[] {new Integer[] {4, 5, 6}, null, DayOfWeek.MONDAY}))
                .isEqualTo("[[4, 5, 6], null, MONDAY]");
    }