@VisibleForTesting
    static String toString(@Nullable TaskManagerLocation location) {
        // '(unassigned)' being the default value is added to support backward-compatibility for the
        // deprecated fields
        return location != null ? location.getEndpoint() : "(unassigned)";
    }
@Test
    void testArchivedTaskManagerLocationFallbackHandling() {
        assertThat(
                        JobExceptionsHandler.toString(
                                (ExceptionHistoryEntry.ArchivedTaskManagerLocation) null))
                .isNull();
    }