Tests for HttpUrlConnection and some refactoring, removed java reflexive
test