@Test
public void ensureDependenciesTest() {

    service.ensureDependencies(kieModuleMock);
    verify(pomServiceMock, times(1)).save(any(Path.class),
                                          any(POM.class),
                                          any(Metadata.class),
                                          anyString());
    reset(pomServiceMock);
    when(dependenciesMock.containsDependency(any())).thenReturn(true);
    service.ensureDependencies(kieModuleMock);
    verify(pomServiceMock, never()).save(any(Path.class),
                                         any(POM.class),
                                         any(Metadata.class),
                                         anyString());
}