migrate to doctest
compilable test.
fix doi resolver.