writing unit test

unit test for encounter and registration handler