private XMPPServer createLocalServer(Entity localServer, Entity localUser, String password, String keystorePath,
String keystorePassword) throws AccountCreationException, FileNotFoundException, Exception {
XMPPServer server = new XMPPServer(localServer.getDomain());
StorageProviderRegistry providerRegistry = new MemoryStorageProviderRegistry();
final AccountManagement accountManagement = (AccountManagement) providerRegistry
.retrieve(AccountManagement.class);
if (!accountManagement.verifyAccountExists(localUser)) {
accountManagement.addUser(localUser, password);
}