Add snapshot test and improve unit tests