[ticket/378] Add functional test and correct check in listener

B3P-378