@Test public void clientIdSearching() throws Exception { SoapMessageBodyManipulator manipulator = new SoapMessageBodyManipulator(); ClientId ss1 = ClientId.create("instance", "memberclass", "membercode", "ss1"); ClientId cmember = ClientId.create("instance", "memberclass", "membercode", null); ClientId ss2 = ClientId.create("instance", "memberclass", "membercode", "ss2"); ClientId cmember2 = ClientId.create("instance", "memberclass", "membercode2", null); List<ClientId> coll1 = Arrays.asList(ss1, cmember); assertTrue(manipulator.isClientInCollection(ss1, coll1)); assertTrue(manipulator.isClientInCollection( ClientId.create("instance", "memberclass", "membercode", "ss1"), coll1)); assertFalse(manipulator.isClientInCollection(ss2, coll1)); assertTrue(manipulator.isClientInCollection(cmember, coll1)); assertFalse(manipulator.isClientInCollection(cmember2, coll1)); assertFalse(manipulator.isClientInCollection( ClientId.create("-", "memberclass", "membercode", "ss1"), coll1)); assertFalse(manipulator.isClientInCollection(ss1, Arrays.asList(cmember))); }
public boolean isClientInCollection(ClientId searchParam, Iterable<ClientId> searched) { ClientId searchResult = Iterables.find(searched, input -> (input.memberEquals(searchParam) && Objects.equals(input.getSubsystemCode(), searchParam.getSubsystemCode())), null); return (searchResult != null); }
SoapMessageBodyManipulator { public boolean isClientInCollection(ClientId searchParam, Iterable<ClientId> searched) { ClientId searchResult = Iterables.find(searched, input -> (input.memberEquals(searchParam) && Objects.equals(input.getSubsystemCode(), searchParam.getSubsystemCode())), null); return (searchResult != null); } }
SoapMessageBodyManipulator { public boolean isClientInCollection(ClientId searchParam, Iterable<ClientId> searched) { ClientId searchResult = Iterables.find(searched, input -> (input.memberEquals(searchParam) && Objects.equals(input.getSubsystemCode(), searchParam.getSubsystemCode())), null); return (searchResult != null); }  }
SoapMessageBodyManipulator { public boolean isClientInCollection(ClientId searchParam, Iterable<ClientId> searched) { ClientId searchResult = Iterables.find(searched, input -> (input.memberEquals(searchParam) && Objects.equals(input.getSubsystemCode(), searchParam.getSubsystemCode())), null); return (searchResult != null); }  String getLoggableMessageText(SoapMessageImpl message, boolean clientSide); boolean isSoapBodyLogged(SoapMessageImpl message, boolean clientSide); boolean isClientInCollection(ClientId searchParam, Iterable<ClientId> searched); }
SoapMessageBodyManipulator { public boolean isClientInCollection(ClientId searchParam, Iterable<ClientId> searched) { ClientId searchResult = Iterables.find(searched, input -> (input.memberEquals(searchParam) && Objects.equals(input.getSubsystemCode(), searchParam.getSubsystemCode())), null); return (searchResult != null); }  String getLoggableMessageText(SoapMessageImpl message, boolean clientSide); boolean isSoapBodyLogged(SoapMessageImpl message, boolean clientSide); boolean isClientInCollection(ClientId searchParam, Iterable<ClientId> searched);  }