@Nonnull public static Predicate<ReadOnlyApplicationLink> withDisplayUrl(@Nonnull final URI displayUrl) { checkNotNull(displayUrl, "displayUrl"); return link -> link != null && displayUrl.equals(link.getDisplayUrl()); } }
private static void stub(ReadOnlyApplicationLink mockValue, MockApplink mockApplink) { String id = getId(mockApplink); ApplicationType applicationType = getType(mockApplink); when(mockValue.getId()).thenReturn(new ApplicationId(id)); when(mockValue.getName()).thenReturn(getName(mockApplink, id)); when(mockValue.getDisplayUrl()).thenReturn(URI.create(getUrl(mockApplink, id))); when(mockValue.getRpcUrl()).thenReturn(URI.create(getRpcUrl(mockApplink, id))); when(mockValue.getType()).thenReturn(applicationType); }