@SuppressWarnings("unchecked")
st
public void onChange() {

    when(jobManager.addJob(any(), any())).thenAnswer(invocation -> {
        props.putAll((Map<String, Object>) invocation.getArguments()[1]);
        return null;
    });
    model.onChange(changes);
    assertTrue(props.containsKey(SiteMapResourceChangeJobConsumer.PN_PATHS));
    final Object pathsObj = props.get(SiteMapResourceChangeJobConsumer.PN_PATHS);
    assertTrue(pathsObj instanceof Set);
    final Set<String> paths = (Set<String>) pathsObj;
    assertTrue(paths.contains(resource.getPath()));
    assertTrue(paths.contains(jcrContent.getPath()));
    assertTrue(paths.contains(page.getPath()));
}