Test handleStatus function