Refactor sanity checks + test that an exception is thrown when too many keys are provided
Use assertThat() instead of assertEquals() and assertTrue()
Fix hard-coded string in the tests
Use instanceOf() instead of "instanceof" + equalTo(true)