package nl.yacht.lakesideresort.domain;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import java.time.Duration;

public class TripTest {

    private Trip trip;


    @Before
    public void setUp() {
        this.trip = new Trip(3);
    }

    @Test
    public void testGetDuration() {


        try {
            Thread.sleep(2000);

            this.trip.end();

            Duration duration = this.trip.getDuration();

            long aantalSeconden = duration.getSeconds();

            aantalSeconden -=2;

            aantalSeconden = Math.abs(aantalSeconden);

            Assert.assertTrue(aantalSeconden < 1);

        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

}

@@ -264,16 +264,217 @@
 %0A    %7D%0A%0A
+    @Test%0A    public void testGetTripNumber() %7B%0A%0A        final int expected = 112233;%0A%0A        this.trip = new Trip(expected);%0A%0A        Assert.assertEquals(expected, this.trip.getTripNumber());%0A    %7D%0A%0A
     @Tes

Add test for Trip::getTripNumber