all: add tests.

Is it proper to expose version setting as a public method? It feels like something that the lib should keep private (and not be tested explicitly).