added unit tests for #9