Search in sources :

Example 1 with FatalFailureMessage

use of org.neo4j.bolt.v3.messaging.response.FatalFailureMessage in project neo4j by neo4j.

the class FailureMessageEncoderTest method shouldLogErrorIfIsFatalError.

@Test
void shouldLogErrorIfIsFatalError() throws Throwable {
    Neo4jPack.Packer packer = mock(Neo4jPack.Packer.class);
    Log log = mock(Log.class);
    FailureMessageEncoder encoder = new FailureMessageEncoder(log);
    // When
    FatalFailureMessage message = new FatalFailureMessage(Status.General.UnknownError, "I am an error message");
    encoder.encode(packer, message);
    // Then
    verify(log).debug("Encoding a fatal failure message to send. Message: %s", message);
}
Also used : FatalFailureMessage(org.neo4j.bolt.v3.messaging.response.FatalFailureMessage) Log(org.neo4j.logging.Log) Neo4jPack(org.neo4j.bolt.packstream.Neo4jPack) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)1 Neo4jPack (org.neo4j.bolt.packstream.Neo4jPack)1 FatalFailureMessage (org.neo4j.bolt.v3.messaging.response.FatalFailureMessage)1 Log (org.neo4j.logging.Log)1