Copy tests from Dropwizard, add support for encoded resources. Fixes #15