SW360HalResourceUtility { public static Optional<String> getLastIndexOfSelfLink(LinkObjects linkObj) { if (linkObj != null) { return getLastIndexOfSelfLink(linkObj.getSelf()); } return Optional.empty(); } private  SW360HalResourceUtility(); static Optional<String> getLastIndexOfSelfLink(LinkObjects linkObj); static Optional<String> getLastIndexOfSelfLink(Self selfObj);  }
@Test public void testGetLastIndexOfSelfLinkNoLinkObjects() { Optional<String> optId = SW360HalResourceUtility.getLastIndexOfSelfLink((LinkObjects) null); assertThat(optId).isNotPresent(); }
@Test public void testGetLastIndexOfSelfLinkNullHRef() { Self self = new Self(); Optional<String> optId = SW360HalResourceUtility.getLastIndexOfSelfLink(self); assertThat(optId).isNotPresent(); }
@Test public void testGetLastIndexOfSelfLinkEmptyHref() { Self self = new Self(""); Optional<String> optId = SW360HalResourceUtility.getLastIndexOfSelfLink(self); assertThat(optId).isNotPresent(); }