Tests added. All passing now, after catching a bug in the monkeypatching logic.

Signed-off-by: Bjorn Westergard <bjornwestergard@Bjorns-MacBook-Pro.local>