1 package it.com.atlassian.plugins.rest.sample.helloworld;
2
3 import com.atlassian.plugins.rest.sample.helloworld.HelloWorld;
4 import com.atlassian.plugins.rest.sample.helloworld.UriBuilder;
5 import com.sun.jersey.api.client.Client;
6 import static org.junit.Assert.assertEquals;
7 import org.junit.Test;
8
9 import java.net.URI;
10
11
12
13
14 public class HelloWorldTest
15 {
16 @Test
17 public void testGetHelloWorld()
18 {
19 final URI baseUri = UriBuilder.create().path("rest").path("hw").path("1").build();
20 final String hello = Client.create().resource(baseUri).path("hello").path("world").get(String.class);
21 assertEquals("Hello world", hello);
22 }
23 }