public static String toOperationDesc(Operation op) {
        Class<? extends Operation> operationClass = op.getClass();
        if (PartitionIteratingOperation.class.isAssignableFrom(operationClass)) {
            PartitionIteratingOperation partitionIteratingOperation = (PartitionIteratingOperation) op;
            OperationFactory operationFactory = partitionIteratingOperation.getOperationFactory();
            String desc = DESCRIPTORS.get(operationFactory.getClass().getName());
            if (desc == null) {
                desc = PartitionIteratingOperation.class.getSimpleName() + "(" + operationFactory.getClass().getName() + ")";
                DESCRIPTORS.put(operationFactory.getClass().getName(), desc);
            }
            return desc;
        } else if (Backup.class.isAssignableFrom(operationClass)) {
            Backup backup = (Backup) op;
            Operation backupOperation = backup.getBackupOp();
            String desc = DESCRIPTORS.get(backupOperation.getClass().getName());
            if (desc == null) {
                desc = Backup.class.getSimpleName() + "(" + backup.getBackupOp().getClass().getName() + ")";
                DESCRIPTORS.put(backupOperation.getClass().getName(), desc);
            }
            return desc;
        } else {
            return operationClass.getName();
        }
    }
@Test
    public void testBackupOperation() throws UnknownHostException {
        Backup backup = new Backup(new DummyBackupOperation(), new Address("127.0.0.1", 5701), new long[]{}, false);
        String result = toOperationDesc(backup);
        assertEquals(format("Backup(%s)", DummyBackupOperation.class.getName()), result);
    }