@Test
public void testExtractPassword() throws IOException {

  File testDir = new File(System.getProperty("test.build.data", 
                                             "target/test-dir"));
  testDir.mkdirs();
  File secretFile = new File(testDir, "secret.txt");
  Writer writer = new FileWriter(secretFile);
  writer.write("hadoop");
  writer.close();
  
  LdapGroupsMapping mapping = new LdapGroupsMapping();
  Assert.assertEquals("hadoop",
      mapping.extractPassword(secretFile.getPath()));
}