adds test on status code
reshuffling a bit before some bigger changes
removes unused whitespace stripping functionality
fixes class cast bug
new factory class for servlet related things
uses the new MockedServlet to create servlet mocks