### Question:
UberUtils { public static UberNode toUberLink(String href, ActionDescriptor actionDescriptor, String... rels) { return toUberLink(href, actionDescriptor, Arrays.asList(rels)); } private  UberUtils(); static void toUberData(AbstractUberNode objectNode, Object object); static UberNode toUberLink(String href, ActionDescriptor actionDescriptor, String... rels); static UberNode toUberLink(String href, ActionDescriptor actionDescriptor, List<String> rels); static List<ActionDescriptor> getActionDescriptors(Link link); static List<String> getRels(Link link);  }### Answer:
@Test public void linkGetToUberNode() throws Exception { UberNode linkNode = UberUtils.toUberLink("/foo", new SpringActionDescriptor("get", RequestMethod.GET.name()), Link.REL_SELF); assertEquals(Arrays.asList(Link.REL_SELF), linkNode.getRel()); assertEquals("/foo", linkNode.getUrl()); assertNull(linkNode.getModel()); assertNull(linkNode.getAction()); }
@Test public void linkPostToUberNode() throws Exception { SpringActionDescriptor actionDescriptor = new SpringActionDescriptor("post", RequestMethod .POST.name()); actionDescriptor.setRequestBody( new SpringActionInputParameter(new MethodParameter(this.getClass() .getMethod("requestBody", FooRequestBody.class), 0), null)); UberNode linkNode = UberUtils.toUberLink("/foo", actionDescriptor, Link.REL_SELF); assertEquals(Arrays.asList(Link.REL_SELF), linkNode.getRel()); assertEquals("/foo", linkNode.getUrl()); assertThat(linkNode.getModel(), Matchers.containsString("foo={foo}")); assertThat(linkNode.getModel(), Matchers.containsString("bar={bar}")); assertEquals(UberAction.APPEND, linkNode.getAction()); }