added unit test for metropolis monte carlo