@Test void verifyEventSourceBeingGenerated() { final String processId = "the_cool_project"; final String instanceId = UUID.randomUUID().toString(); ProcessInstance pi = mock(ProcessInstance.class); when(pi.getProcessId()).thenReturn(processId); when(pi.getId()).thenReturn(instanceId); final String source = DataEventAttrBuilder.toSource(pi); assertThat(source).isNotBlank().contains(processId).contains(instanceId); }
public static String toSource(final ProcessInstance process) { Objects.requireNonNull(process); return String.format(AbstractDataEvent.SOURCE_FORMAT, process.getProcessId(), process.getId()); }
DataEventAttrBuilder { public static String toSource(final ProcessInstance process) { Objects.requireNonNull(process); return String.format(AbstractDataEvent.SOURCE_FORMAT, process.getProcessId(), process.getId()); } }
DataEventAttrBuilder { public static String toSource(final ProcessInstance process) { Objects.requireNonNull(process); return String.format(AbstractDataEvent.SOURCE_FORMAT, process.getProcessId(), process.getId()); } private  DataEventAttrBuilder(); }
DataEventAttrBuilder { public static String toSource(final ProcessInstance process) { Objects.requireNonNull(process); return String.format(AbstractDataEvent.SOURCE_FORMAT, process.getProcessId(), process.getId()); } private  DataEventAttrBuilder(); static String toSource(final ProcessInstance process); static String toType(final String channelName, final ProcessInstance process); static String toType(final String channelName, final String processId); }
DataEventAttrBuilder { public static String toSource(final ProcessInstance process) { Objects.requireNonNull(process); return String.format(AbstractDataEvent.SOURCE_FORMAT, process.getProcessId(), process.getId()); } private  DataEventAttrBuilder(); static String toSource(final ProcessInstance process); static String toType(final String channelName, final ProcessInstance process); static String toType(final String channelName, final String processId);  }