public PuppetDBClient getClient() throws BackingStoreException {
BasicAPIPreferences prefs = new BasicAPIPreferences();
prefs.setServiceHostname(getHostname());
prefs.setServicePort(getPort());
prefs.setAllowAllHosts(true);
PuppetDBClient client;
if(getHostCert() == null)
client = PuppetDBClientFactory.newClient(prefs, getCommonModule());
else {
client = PuppetDBClientFactory.newClient(prefs, getCommonModule(), new AbstractModule() {
@Override