I have tried implementing the unbound id in memory directory server for simulating an LDAP directory for testing purpose. The code works fine as a java application with an LDIF file as sample directory data. But when i use it in my android application code, the application aborts saying as "it is unable to find or load the class InMemoryDirectoryServerConfig" . Below are the key code snippet use to connect to the in Memory LDAP server.
InMemoryDirectoryServerConfig config = new InMemoryDirectoryServerConfig("dc=example,dc=com");
directoryServer = new InMemoryDirectoryServer(config);
directoryServer.importFromLDIF(true, getClass().getResource("example6.ldif").getPath());
directoryServer.startListening();
ldapConnection = directoryServer.getConnection();
SearchRequest searchRequest=new SearchRequest(techMbaseDn, SearchScope.SUB,Filter.createEqualityFilter("uid", name),"givenName","uid");
Kindly let me know whether its possible to simulate the directory server in an android app with ldif file and or its just not possible to use this code in an android app.