1 package com.atlassian.plugins.rest.module.util;
2
3 import org.junit.Before;
4 import org.junit.Test;
5
6 import java.net.URI;
7
8 import static org.junit.Assert.assertEquals;
9
10
11
12
13 public class RestUrlBuilderImplTest
14 {
15 private RestUrlBuilderImpl urlBuilder;
16
17 @Before
18 public void setup()
19 {
20 urlBuilder = new RestUrlBuilderImpl();
21 }
22
23 @Test
24 public void testGetUrlForWithBaseUrl() throws Exception
25 {
26 assertEquals("http://base2/dummy/sub",
27 urlBuilder.getUrlFor(new URI("http://base2"), FooResource.class).subResource().toString());
28 }
29 }