public static String errorString(final long position)
    {
        if (MAX_POSITION_EXCEEDED <= position && position < 0)
        {
            final int errorCode = (int)position;
            switch (errorCode)
            {
                case (int)NOT_CONNECTED:
                    return "NOT_CONNECTED";
                case (int)BACK_PRESSURED:
                    return "BACK_PRESSURED";
                case (int)ADMIN_ACTION:
                    return "ADMIN_ACTION";
                case (int)CLOSED:
                    return "CLOSED";
                case (int)MAX_POSITION_EXCEEDED:
                    return "MAX_POSITION_EXCEEDED";
                default:
                    return "UNKNOWN";
            }
        }
        else if (0 <= position)
        {
            return "NONE";
        }
        else
        {
            return "UNKNOWN";
        }
    }
@Test
    void shouldReturnErrorMessages()
    {
        assertEquals("NOT_CONNECTED", errorString(-1L));
        assertEquals("BACK_PRESSURED", errorString(-2L));
        assertEquals("ADMIN_ACTION", errorString(-3L));
        assertEquals("CLOSED", errorString(-4L));
        assertEquals("MAX_POSITION_EXCEEDED", errorString(-5L));
        assertEquals("NONE", errorString(0L));
        assertEquals("NONE", errorString(1L));
        assertEquals("UNKNOWN", errorString(-6L));
        assertEquals("UNKNOWN", errorString(Long.MIN_VALUE));
    }