private void saveRnRFormError() { SyncError syncError1 = new SyncError("errorMessage1", SyncType.RnRForm, 1l); SyncError syncError2 = new SyncError("errorMessage2", SyncType.RnRForm, 1l); SyncError syncError3 = new SyncError("errorMessage3", SyncType.RnRForm, 2l); syncErrorsRepository.save(syncError1); syncErrorsRepository.save(syncError2); syncErrorsRepository.save(syncError3); }
@Test public void shouldSaveSyncError() throws Exception { SyncError expectSyncError = new SyncError("errorMessage", SyncType.RnRForm, 1l); syncErrorsRepository.save(expectSyncError); SyncError actualSyncError = syncErrorsRepository.getBySyncTypeAndObjectId(SyncType.RnRForm, 1l).get(0); assertThat(expectSyncError.getErrorMessage(), is(actualSyncError.getErrorMessage())); }