You can add APOC (with Maven) as follows:
If you plan to only use APOC via its defined Cypher procedures/functions, provided scope is fine.
If you plan to use APOC Java methods directly (which I would not necessarily recommend), then you need to remove the scope setting.
For testing (assuming you only need APOC Cypher API, not the Java API), you can do something like this with TestContainers:
private static final Neo4jContainer<?> neo4jContainer = new Neo4jContainer<>("neo4j:4.3")