use of org.neo4j.kernel.impl.annotations.Documented in project neo4j by neo4j.
the class TransactionTest method errors_in_open_transaction.
@Test
@Documented("Handling errors in an open transaction\n" + "\n" + "Whenever there is an error in a request the server will rollback the transaction.\n" + "By inspecting the response for the presence/absence of the `transaction` key you can tell if the " + "transaction is still open")
public void errors_in_open_transaction() throws JsonParseException {
// Given
String location = POST(getDataUri() + "transaction").location();
// Document
ResponseEntity response = gen.get().expectedStatus(200).payload(quotedJson("{ 'statements': [ { 'statement': 'This is not a valid Cypher Statement.' } ] }")).post(location);
// Then
Map<String, Object> result = jsonToMap(response.entity());
assertThat(result, not(hasKey("transaction")));
}
Aggregations