Added this line instead of using EndpointFactory.getEndpoint(). And the corresponding method right below this. This file was written by someone with different whitespace it seems.