@@ -0,0 +1,1339 @@
+package com.crossover.trial.weather;%0A%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.beans.factory.annotation.Value;%0Aimport org.springframework.boot.context.embedded.LocalServerPort;%0Aimport org.springframework.boot.test.context.SpringBootTest;%0Aimport org.springframework.boot.test.web.client.TestRestTemplate;%0Aimport org.springframework.http.HttpStatus;%0Aimport org.springframework.http.ResponseEntity;%0Aimport org.springframework.test.context.TestPropertySource;%0Aimport org.springframework.test.context.junit4.SpringRunner;%0A%0Aimport static org.assertj.core.api.BDDAssertions.then;%0A/**%0A * Created by Mahdi on 1/10/2017.%0A */%0A@RunWith(SpringRunner.class)%0A@SpringBootTest(classes = WeatherServer.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)%0Apublic class RestWeatherTests %7B%0A    @LocalServerPort%0A    private int port;%0A%0A%0A%0A    @Autowired%0A    private TestRestTemplate testRestTemplate;%0A%0A    @Test%0A    public void shouldReturn200WhenSendingPing() throws Exception %7B%0A        @SuppressWarnings(%22rawtypes%22)%0A        ResponseEntity%3CString%3E entity = this.testRestTemplate.getForEntity(%0A            %22http://localhost:%22 + this.port + %22/collect/ping%22, String.class);%0A        then(entity.getStatusCode()).isEqualTo(HttpStatus.OK);%0A    %7D%0A%0A%7D%0A

add test