Added partial unit tests

Here are the tests written on testfest
Tip: try to use assertSame instead of assertEquals. assertSame compares the expected and actual result more strictly (sort of like `===`) than assertEqual (sort of like `==`).

I have encountered edge cases in the past where I though a test succeeded but the code still failed because of type juggling (0 == null is true for example).