executor.execute(r3).assertStatus(200);
}
@Test
public void postMultiFactsMultiTypesNeg() throws Exception {
Request r1 = builder
.buildOtherRequest(
new HttpPut(builder.buildUrl("/factstore/facts/"
+ encodeURI("http://iks-project.eu/ont/employeeOf3Neg"))))
.withContent(
"{\"@context\":{\"iks\":\"http://iks-project.eu/ont/\",\"@types\":{\"person\":\"iks:person\",\"organization\":\"iks:organization\"}}}")
.withHeader("Content-Type", "application/json");
executor.execute(r1).assertStatus(201);
Request r2 = builder
.buildOtherRequest(
new HttpPut(builder.buildUrl("/factstore/facts/"
+ encodeURI("http://iks-project.eu/ont/friendOf3Neg"))))
.withContent(
"{\"@context\":{\"iks\":\"http://iks-project.eu/ont/\",\"@types\":{\"person\":\"iks:person\",\"friend\":\"iks:person\"}}}")
.withHeader("Content-Type", "application/json");
executor.execute(r2).assertStatus(201);
Request r3 = builder
.buildOtherRequest(new HttpPost(builder.buildUrl("/factstore/facts/")))
.withContent(
"{\"@context\":{\"iks\":\"http://iks-project.eu/ont/\",\"upb\":\"http://upb.de/persons/\"},\"@subject\":[{\"@profile\":\"iks:employeeOf3NegWrong\",\"person\":{\"@iri\":\"upb:bnagel\"},\"organization\":{\"@iri\":\"http://uni-paderborn.de\"}},{\"@profile\":\"iks:friendOf3Neg\",\"person\":{\"@iri\":\"upb:bnagel\"},\"friend\":{\"@iri\":\"upb:fchrist\"}}]}")
.withHeader("Content-Type", "application/json");
executor.execute(r3).assertStatus(500);