The client is unauthorized due to authentication in my Spring Boot Test

Hi,

I have a problem about running any test of AppApplicationTests.

When I run with docker and try any request, I cannot have any issue.

org.neo4j.driver.exceptions.AuthenticationException: The client is unauthorized due to authentication failure.

How can I fix this codes snippet shown below.

@DynamicPropertySource
static void properties(DynamicPropertyRegistry registry) {
registry.add("spring.neo4j.authentication.username", () -> "neo4j");
registry.add("spring.neo4j.authentication.password", () -> "123456");
registry.add("spring.neo4j.uri", () -> container.getBoltUrl());
}

Here is my repository : Project Link

Here is the solution

The issue disappeared when the password changed to ``````container.getAdminPassword()``

@DynamicPropertySource
static void properties(DynamicPropertyRegistry registry) {
registry.add("spring.neo4j.authentication.username", () -> "neo4j");
registry.add("spring.neo4j.authentication.password", () -> container.getAdminPassword());
registry.add("spring.neo4j.uri", () -> container.getBoltUrl());
}