// Path: src/main/java/com/soebes/maven/extensions/TimePlusSize.java
// public class TimePlusSize
//     extends SystemTime
// {
// 
//     private long size;
// 
//     public TimePlusSize()
//     {
//         super();
//     }
// 
//     public long getSize()
//     {
//         return size;
//     }
// 
//     public void setSize( long size )
//     {
//         this.size = size;
//     }
// 
// }


import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import java.io.File;
import org.eclipse.aether.RepositoryEvent;
import org.eclipse.aether.RepositoryEvent.EventType;
import org.eclipse.aether.RepositorySystemSession;
import org.eclipse.aether.metadata.Metadata;
import org.eclipse.aether.metadata.Metadata.Nature;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import com.soebes.maven.extensions.TimePlusSize;
    @Test
    public void shouldResultWitClassifier()
    {
        Metadata artifact = createMockMetadata( "groupId", "artifactId", "version", "type", Nature.RELEASE );

        String result = aat.getArtifactId( artifact );

        assertThat( result ).isEqualTo( "groupId:artifactId:version:type:RELEASE" );

    }

    @Test
    public void shouldResultInSingleEntryInTimerEvents()
        throws InterruptedException
    {
        Metadata artifact = createMockMetadata( "groupId", "artifactId", "version", "jar", null );

        RepositoryEvent build =
            new RepositoryEvent.Builder( mock( RepositorySystemSession.class ),
                                         EventType.ARTIFACT_DEPLOYED ).setMetadata( artifact ).build();
        aat.start( build );

        Thread.sleep( 10L );

        aat.stop( build );

        String key = aat.getArtifactId( artifact );

        assertThat( aat.getTimerEvents() ).hasSize( 1 ).containsKey( key );

// Path: src/main/java/com/soebes/maven/extensions/TimePlusSize.java
// public class TimePlusSize
//     extends SystemTime
// {
// 
//     private long size;
// 
//     public TimePlusSize()
//     {
//         super();
//     }
// 
//     public long getSize()
//     {
//         return size;
//     }
// 
//     public void setSize( long size )
//     {
//         this.size = size;
//     }
// 
// }


// Path: src/test/java/com/soebes/maven/extensions/metadata/AbstractMetadataTimerTest.java
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import java.io.File;
import org.eclipse.aether.RepositoryEvent;
import org.eclipse.aether.RepositoryEvent.EventType;
import org.eclipse.aether.RepositorySystemSession;
import org.eclipse.aether.metadata.Metadata;
import org.eclipse.aether.metadata.Metadata.Nature;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import com.soebes.maven.extensions.TimePlusSize;

    @Test
    public void shouldResultWitClassifier()
    {
        Metadata artifact = createMockMetadata( "groupId", "artifactId", "version", "type", Nature.RELEASE );

        String result = aat.getArtifactId( artifact );

        assertThat( result ).isEqualTo( "groupId:artifactId:version:type:RELEASE" );

    }

    @Test
    public void shouldResultInSingleEntryInTimerEvents()
        throws InterruptedException
    {
        Metadata artifact = createMockMetadata( "groupId", "artifactId", "version", "jar", null );

        RepositoryEvent build =
            new RepositoryEvent.Builder( mock( RepositorySystemSession.class ),
                                         EventType.ARTIFACT_DEPLOYED ).setMetadata( artifact ).build();
        aat.start( build );

        Thread.sleep( 10L );

        aat.stop( build );

        String key = aat.getArtifactId( artifact );

        assertThat( aat.getTimerEvents() ).hasSize( 1 ).containsKey( key );

        TimePlusSize timePlusSize = aat.getTimerEvents().get( key );