use httptest.Sever for testing

Hi again,

just as #5 but in it's own branch.