@Override
    public void beforeMigration(PartitionMigrationEvent event) {
        if (isPrimaryReplicaMigrationEvent(event)) {
            ownerMigrationsStarted.incrementAndGet();
        }
        migrationAwareService.beforeMigration(event);
    }
@Test
    public void beforeMigration() {
        // when: countingMigrationAwareService.beforeMigration was invoked (in setUp method)
        // then: if event involves primary replica, stamp should change.
        if (isPrimaryReplicaMigrationEvent(event)) {
            assertEquals(IN_FLIGHT_MIGRATION_STAMP, countingMigrationAwareService.getMigrationStamp());
            assertFalse(countingMigrationAwareService.validateMigrationStamp(IN_FLIGHT_MIGRATION_STAMP));
        } else {
            assertEquals(initialMigrationStamp, countingMigrationAwareService.getMigrationStamp());
            assertTrue(countingMigrationAwareService.validateMigrationStamp(initialMigrationStamp));
        }
    }