@Test
public void getFiles_wrongRunmode() throws AecuException {

    Resource dirResource = mock(Resource.class);
    when(resolver.getResource(DIR)).thenReturn(dirResource);
    when(dirResource.getName()).thenReturn("dir.invalid");
    ValueMap dirValues = mock(ValueMap.class);
    when(dirValues.get(JcrConstants.JCR_PRIMARYTYPE, String.class)).thenReturn(JcrResourceConstants.NT_SLING_FOLDER);
    when(dirResource.getValueMap()).thenReturn(dirValues);
    assertEquals(Arrays.asList(), service.getFiles(DIR));
}