tests: add more unit tests for custom handlers

Signed-off-by: David Aguilar <davvid@gmail.com>