@Override
    public void onTaskFinished(TaskAttachment attachment) {
        if (attachment instanceof BrokerPendingTaskAttachment) {
            onPendingTaskFinished((BrokerPendingTaskAttachment) attachment);
        } else if (attachment instanceof BrokerLoadingTaskAttachment) {
            onLoadingTaskFinished((BrokerLoadingTaskAttachment) attachment);
        }
    }
@Test
    public void testLoadingTaskOnFinishedPartialUpdate(@Injectable BrokerPendingTaskAttachment attachment1,
                                          @Injectable LoadTask loadTask1,
                                          @Mocked GlobalStateMgr globalStateMgr,
                                          @Injectable Database database) throws DdlException {
        BrokerLoadJob brokerLoadJob = new BrokerLoadJob();
        Map<String, String> properties = Maps.newHashMap();
        properties.put(LoadStmt.PARTIAL_UPDATE_MODE, "column");
        properties.put(LoadStmt.MERGE_CONDITION, "v1");
        brokerLoadJob.setJobProperties(properties);
        brokerLoadJob.onTaskFinished(attachment1);
    }