MigrationServiceImpl extends AbstractConsoleService<MigrationEventTblDao> implements MigrationService { @Override public void updateMigrationShardLogById(final long id, final String log) { MigrationShardTbl migrationShardTbl = new MigrationShardTbl(); migrationShardTbl.setId(id); migrationShardTbl.setLog(log); queryHandler.handleUpdate(new DalQuery<Integer>() { @Override public Integer doQuery() throws DalException { return migrationShardTblDao.updateLogById(migrationShardTbl, MigrationShardTblEntity.UPDATESET_FULL); } }); }  @Override MigrationEventTbl find(final long id); @Override long countAll(); @Override long countAllByCluster(long clusterId); @Override List<MigrationModel> find(long size, long offset); @Override List<MigrationModel> findByCluster(long clusterId, long size, long offset); @Override List<MigrationEventTbl> findAll(); @Override MigrationClusterTbl findMigrationCluster(final long eventId, final long clusterId); @Override void updateMigrationClusterStartTime(long migrationClusterId, Date startTime); @Override void updateStatusAndEndTimeById(long migrationClusterId, MigrationStatus status, Date endTime); @Override void updatePublishInfoById(long migrationClusterId, String publishInfo); @Override MigrationClusterTbl findLatestUnfinishedMigrationCluster(final long clusterId); @Override List<MigrationShardTbl> findMigrationShards(final long migrationClusterId); @Override List<MigrationClusterModel> getMigrationClusterModel(long eventId); @Override Long createMigrationEvent(MigrationRequest request); @Override void updateMigrationShardLogById(final long id, final String log); @Override void continueMigrationCluster(final long eventId, final long clusterId); @Override void continueMigrationEvent(long id); @Override MigrationEvent getMigrationEvent(long eventId); @Override MigrationCluster rollbackMigrationCluster(long eventId, long clusterId); @Override MigrationCluster rollbackMigrationCluster(long eventId, String clusterName); @Override void cancelMigrationCluster(long eventId, long clusterId); @Override void forcePublishMigrationCluster(long eventId, long clusterId); @Override void forceEndMigrationClsuter(long eventId, long clusterId); @Override MigrationSystemAvailableChecker.MigrationSystemAvailability getMigrationSystemAvailability(); @Override TryMigrateResult tryMigrate(String clusterName, String fromIdc, String toIdc); @Override RetMessage getMigrationSystemHealth(); @VisibleForTesting MigrationServiceImpl setChecker(MigrationSystemAvailableChecker checker); @VisibleForTesting MigrationServiceImpl setMigrationEventManager(MigrationEventManager migrationEventManager); @VisibleForTesting MigrationServiceImpl setClusterService(ClusterService clusterService); @VisibleForTesting MigrationServiceImpl setDcClusterService(DcClusterService dcClusterService); @VisibleForTesting MigrationServiceImpl setDcService(DcService dcService); @VisibleForTesting MigrationServiceImpl setMigrationClusterDao(MigrationClusterDao migrationClusterDao); @VisibleForTesting MigrationServiceImpl setConfigService(ConfigService configService); @VisibleForTesting MigrationServiceImpl setMigrationShardTblDao(MigrationShardTblDao migrationShardTblDao);  }
@Test(expected = DalUpdateException.class) public void testUpdateLogById() { migrationService.updateMigrationShardLogById(887L, "test"); }