Recommended solutions based on your search
If you're unit testing, you should instantiate only the service and mock the dependencies. If you're testing integration, you should add all the mocking to the configurations file.
Solutions on the web
java.lang.IllegalArgumentException: Content entity object should not be null