Add unit tests for MetropolisHastings

As per david's suggestion.