use of org.neo4j.bolt.v4.BoltStateMachineV4 in project neo4j by neo4j.
the class ReadyStateIT method shouldMoveToAutoCommitOnRun_succ.
@Test
void shouldMoveToAutoCommitOnRun_succ() throws Throwable {
// Given
BoltStateMachineV4 machine = newStateMachine();
machine.process(newHelloMessage(), nullResponseHandler());
// When
BoltResponseRecorder recorder = new BoltResponseRecorder();
machine.process(new RunMessage("CREATE (n {k:'k'}) RETURN n.k", EMPTY_PARAMS), recorder);
// Then
RecordedBoltResponse response = recorder.nextResponse();
assertThat(response).satisfies(succeeded());
assertTrue(response.hasMetadata("fields"));
assertTrue(response.hasMetadata("t_first"));
assertThat(machine.state()).isInstanceOf(AutoCommitState.class);
}
Aggregations