We can still provide optional dependencies with constructor injection using Java's Optional type. The basic constructs of the Java language give us a way to do this by creating a new instance of the ArticleRepository. This will work for our tests, but if you try and run your application, you will see an error in the console. Software Engineering. No additional project dependencies are necessary for this example.
nest...