@Override
public DesignDocument getDesignDoc(final String designDocumentName) {
try {
DesignDocument design = asyncGetDesignDocument(designDocumentName).get();
if(design == null) {
throw new InvalidViewException("Could not load design document \""
+ designDocumentName + "\"");
}
return design;
} catch (InterruptedException e) {
throw new RuntimeException("Interrupted getting design document", e);