Reintroduce handler unit tests

Originally from: 59c6cd9