LinkUtils { public static Object best(Link<?> link) { ArgumentChecker.notNull(link, "link"); ObjectId objectId = link.getObjectId(); ExternalIdBundle bundle = link.getExternalId(); return Objects.firstNonNull(objectId, bundle); } protected  LinkUtils(); static Object best(Link<?> link); static String bestName(Link<?> link); static boolean isValid(final Link<?> link);  }
@Test(expectedExceptions=IllegalArgumentException.class) public void test_best_null() { assertEquals(null, LinkUtils.best(null)); }