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 private RestUrlBuilderImpl urlBuilder;
15
16 @Before
17 public void setup() {
18 urlBuilder = new RestUrlBuilderImpl();
19 }
20
21 @Test
22 public void testGetUrlForWithBaseUrl() throws Exception {
23 assertEquals("http://base2/dummy/sub",
24 urlBuilder.getUrlFor(new URI("http://base2"), FooResource.class).subResource().toString());
25 }
26 }