@Test
public void shouldCreateUri() {

    final Nobt nobt = aNobt().withId(new NobtId("foo")).build();
    final LinkFactory<Expense> expenseLinkFactory = new ExpenseLinkFactory(new BasePath("http", "localhost:1234"), nobt);
    final URI linkToExpense = expenseLinkFactory.createLinkTo(anExpense().withId(1).build());
    Assert.assertEquals("http://localhost:1234/nobts/foo/expenses/1", linkToExpense.toString());
}