### Question:
PatchObject { public Patch toPatch(Map<String, RDFNode> blankNodes) throws PatchParserException { RDFNode rdfNode; if (getObjectLanguage() != null && getObjectValue() != null) { rdfNode = createLangLiteral(getObjectValue(), getObjectLanguage()); } else if (getObjectDatatype() != null && getObjectValue() != null) { rdfNode = getDataTypeNode(blankNodes); } else if (getObjectValue() != null) { rdfNode = createPlainLiteral(getObjectValue()); } else { throw new PatchParserException("No object was found"); } Resource subject = blankNodes.containsKey(getSubject()) ? blankNodes.get(getSubject()).asResource() : createResource(getSubject()); Statement statement = createStatement( subject, createProperty(getPredicate()), rdfNode); return new Patch(op, statement, null); } PatchObject(); static boolean isBlankNodeUri(String objectValue); void setSubject(String uri); String getSubject(); void setPredicate(String pred); String getPredicate(); void setObjectValue(String obj); Map<String, String> getObject(); void setObject(Map<String, String> object2); String getObjectValue(); String getObjectDatatype(); String getObjectLanguage(); void setOperation(String operation2); String getOperation(); Patch toPatch(Map<String, RDFNode> blankNodes); Patch toPatch();  }### Answer:
@Test(expected = PatchParserException.class) public void test_getting_null_to_patch() throws PatchParserException{ new PatchObject().toPatch(); }