public static BadRequestException badRequest(final Throwable e) {
        return new BadRequestException(
                e.getMessage(),
                Response.status(Status.BAD_REQUEST)
                        .entity(e.getMessage())
                        .type(MediaType.TEXT_PLAIN)
                        .build(),
                e);
    }
Ensure value is not empty or throw a {@link NotFoundException}. For use in validating
responses.
stroom-util/src/main/java/stroom/util/rest/RestUtil.java