@Test
public void testListLocations() throws IOException {

    String[] locations1 = new String[] { "test1", "test2" };
    Mockito.when(permAdmin.getLocations()).thenReturn(locations1);
    String[] locations2 = mbean.listLocations();
    Assert.assertNotNull(locations2);
    Assert.assertEquals(2, locations2.length);
    Assert.assertSame(locations1, locations2);
}