@staticmethod
def validity_window(current, start, end):
    """
        Returns True if `current` is in the validity window bounded by `start` and `end`.

        This method is circular-buffer aware and they are 2 cases (validity window ``[====]``)::

            1) start=     6 end=9 :   0   1  2 3 4 5 [=======] 10 ... 65'533  65'534 65'535
            2) start=65'534 end=1 :  ======] 2 3 4 5  6 7 8 9  10 ... 65'533 [=============

        **Example usage**

        Testing validity window condition:

        >>> from pytoolbox.unittest import asserts
        >>> asserts.false(FecReceiver.validity_window(    0,     5, 10))
        >>> asserts.true( FecReceiver.validity_window(    5,     5, 10))
        >>> asserts.true( FecReceiver.validity_window(    8,     5, 10))
        >>> asserts.true( FecReceiver.validity_window(   10,     5, 10))
        >>> asserts.false(FecReceiver.validity_window(   15,     5, 10))
        >>> asserts.true( FecReceiver.validity_window(    0, 65534,  2))
        >>> asserts.true( FecReceiver.validity_window(    2, 65534,  2))
        >>> asserts.false(FecReceiver.validity_window(    5, 65534,  2))
        >>> asserts.true( FecReceiver.validity_window(65534, 65534,  2))
        >>> asserts.true( FecReceiver.validity_window(65535, 65534,  2))
        """
    if end > start:
        return current >= start and current <= end
    else:
        return current <= end or current >= start
