@@ -0,0 +1,1460 @@
+package se.arbetsformedlingen.venice.probe;%0A%0Aimport org.junit.Test;%0A%0Aimport static org.assertj.core.api.AssertionsForClassTypes.assertThat;%0Aimport static org.mockito.Mockito.mock;%0Aimport static org.mockito.Mockito.when;%0A%0Apublic class ProbeCheckerTest %7B%0A%0A    @Test%0A    public void check_probe() throws Exception %7B%0A        Application application = new Application(%22gfr%22);%0A        Host host = new Host(%22L7700770%22);%0A        Status status = new Status(%22OK%22);%0A        Version version = new Version(%224.6.470%22);%0A        ProbeResponse expected = new ProbeResponse(application, host, status, version);%0A%0A        ProbeStatus probeStatus = new ProbeStatus();%0A%0A        CheckProbe probe = prepareMock();%0A%0A        ProbeChecker checker = new ProbeChecker(probe, probeStatus);%0A        checker.run();%0A%0A        while (checker.isWorking()) %7B%0A            Thread.sleep(5);%0A        %7D%0A%0A        ProbeResponse actual = probeStatus.getStatus(new Host(%22L7700770%22));%0A%0A        assertThat(actual).isEqualTo(expected);%0A    %7D%0A%0A    private CheckProbe prepareMock() %7B%0A        CheckProbe checkProbe = mock(CheckProbe.class);%0A%0A        Application application = new Application(%22gfr%22);%0A        Host host = new Host(%22L7700770%22);%0A        Status status = new Status(%22OK%22);%0A        Version version = new Version(%224.6.470%22);%0A        ProbeResponse response = new ProbeResponse(application, host, status, version);%0A%0A        when(checkProbe.get()).thenReturn(response);%0A%0A        return checkProbe;%0A    %7D%0A%7D%0A

Check a probe and verify that the result is available from the statuses holder