@Test
public void acceptMergeRequestWithConflictsTest() {

    // Setup
    when(utilsService.getConflicts(any(Resource.class), any(Resource.class), any(RepositoryConnection.class))).thenReturn(Collections.singleton(conflict));
    thrown.expect(IllegalArgumentException.class);
    try (RepositoryConnection conn = repo.getConnection()) {
        manager.acceptMergeRequest(request1.getResource(), user1, conn);
    }
    verify(utilsService).getConflicts(eq(sourceCommit1.getResource()), eq(targetCommit1.getResource()), any(RepositoryConnection.class));
    verify(versioningManager, never()).merge(any(Resource.class), any(Resource.class), any(Resource.class), any(Resource.class), any(User.class), any(), any());
    verify(utilsService, never()).updateObject(any(), any(RepositoryConnection.class));
}