package org.safehaus.subutai.plugin.common.mock;


import java.util.Date;
import java.util.UUID;

import org.safehaus.subutai.common.tracker.OperationState;
import org.safehaus.subutai.common.tracker.TrackerOperation;


public class TrackerOperationMock implements TrackerOperation
{
    private final StringBuilder log = new StringBuilder();

    private OperationState state = OperationState.RUNNING;


    @Override
    public String getDescription()
    {
        return null;
    }


    @Override
    public UUID getId()
    {
        return null;
    }


    @Override
    public String getLog()
    {
        return log.toString();
    }


    @Override
    public Date createDate()
    {
        return null;
    }


    @Override
    public OperationState getState()
    {
        return state;
    }


    @Override
    public void addLog( String logString )
    {
        log.append( logString );
    }


    @Override
    public void addLogDone( String logString )
    {
        addLog( logString );
        state = OperationState.SUCCEEDED;
    }


    @Override
    public void addLogFailed( String logString )
    {
        addLog( logString );
        state = OperationState.FAILED;
    }
}

@@ -336,17 +336,110 @@
 lder();%0A
+    private final UUID uuid = UUID.randomUUID();%0A    private final Date created = new Date();
 %0A
-
     priv
@@ -553,36 +553,38 @@
 %0A        return 
-null
+%22desc%22
 ;%0A    %7D%0A%0A%0A    @O
@@ -628,36 +628,36 @@
 %0A        return 
-null
+uuid
 ;%0A    %7D%0A%0A%0A    @O
@@ -804,12 +804,15 @@
 urn 
-null
+created
 ;%0A  

return non-null values in track operation mock