@Test (timeout = 30000)
public void testShouldNotthrowNPE() throws Exception {

  Configuration conf1 = new Configuration();
  try {
    dirAllocator.getLocalPathForWrite("/test", conf1);
    fail("Exception not thrown when " + CONTEXT + " is not set");
  } catch (IOException e) {
    assertEquals(CONTEXT + " not configured", e.getMessage());
  } catch (NullPointerException e) {
    fail("Lack of configuration should not have thrown an NPE.");
  }
}