public void beforeClass() throws Exception {
// All of this tom-foolerly is simply because @CouchAttachment was added to LocationEntity for the
// sake of the write test. Here we just want to fake it out so that this part of the test doesn't fail.
final GetAttachmentResponse response = new GetAttachmentResponse(URI.create("http://whatever.com"), CouchHttpStatus.OK, "x", "x", CouchMediaType.TEXT_PLAIN, "stuff", null);
getRequestFactory = new GetRequestFactory(null) {
@Override public GetAttachmentRequest attachment(String documentId, String documentRevision, String attachmentName) {
return new GetAttachmentRequest(null, documentId, documentRevision, attachmentName) {
@Override public GetAttachmentResponse execute() {
return response;
}