@Test public void resolveDiff_shouldReturnSuccessIfOnlyLocalHasDateChanged() { SyncObject localObj = getSyncObject(SimpleObjectMother.createInstanceWithDateChanged( LATER_DATE, true, false)); SyncObject foreignObj = getSyncObject(SimpleObjectMother.createInstanceWithDateChanged( null, false, false)); MergeResult actual = newIsTheBestMergeBehaviour.resolveDiff(SyncObject.class, localObj, foreignObj); Assert.assertTrue(actual instanceof MergeSuccess); Assert.assertEquals(MergeMessageEnum.LOCAL_SAVE_MESSAGE, actual.getMessage()); Assert.assertTrue(((MergeSuccess) actual).shouldUpdateLocal()); Assert.assertFalse(((MergeSuccess) actual).shouldUpdateForeign()); }
@Override public MergeResult<SyncObject> resolveDiff(Class<? extends SyncObject> clazz, SyncObject local, SyncObject foreign) { return resolveConflict(local, foreign); }
NewIsTheBestMergeBehaviourImpl implements MergeBehaviour<SyncObject> { @Override public MergeResult<SyncObject> resolveDiff(Class<? extends SyncObject> clazz, SyncObject local, SyncObject foreign) { return resolveConflict(local, foreign); } }
NewIsTheBestMergeBehaviourImpl implements MergeBehaviour<SyncObject> { @Override public MergeResult<SyncObject> resolveDiff(Class<? extends SyncObject> clazz, SyncObject local, SyncObject foreign) { return resolveConflict(local, foreign); }  }
NewIsTheBestMergeBehaviourImpl implements MergeBehaviour<SyncObject> { @Override public MergeResult<SyncObject> resolveDiff(Class<? extends SyncObject> clazz, SyncObject local, SyncObject foreign) { return resolveConflict(local, foreign); }  @Override MergeResult<SyncObject> resolveDiff(Class<? extends SyncObject> clazz, SyncObject local, SyncObject foreign); }
NewIsTheBestMergeBehaviourImpl implements MergeBehaviour<SyncObject> { @Override public MergeResult<SyncObject> resolveDiff(Class<? extends SyncObject> clazz, SyncObject local, SyncObject foreign) { return resolveConflict(local, foreign); }  @Override MergeResult<SyncObject> resolveDiff(Class<? extends SyncObject> clazz, SyncObject local, SyncObject foreign);  }