To make the code even more loosely coupled (as we start writing the tests), let's create an interface for BusinessService and have BusinessServiceImpl updated to implement the interface:
public interface BusinessService {
long calculateSum(User user);
}
public class BusinessServiceImpl implements BusinessService {
//.... Rest of code..
}
Using interfaces helps to create loosely coupled code. The exact interface implementation of DataService to use can be changed without changing the code of BusinessServiceImpl.