@Deprecated
    // TODO: Remove in Smack 4.5.
    public void setPriority(int priority) {
        if (priority < -128 || priority > 127) {
            throw new IllegalArgumentException("Priority value " + priority +
                    " is not valid. Valid range is -128 through 127.");
        }
        setPriority((byte) priority);
    }
@Test
    public void setIllegalPriorityTest() {
        assertThrows(IllegalArgumentException.class, () ->
        getNewPresence().setPriority(Integer.MIN_VALUE)
        );
    }