@Override @SuppressWarnings({"rawtypes", "unchecked"}) public void migrate(final ProcessSession newOwner, final Collection<FlowFile> flowFiles) { if (Objects.requireNonNull(newOwner) == this) { throw new IllegalArgumentException("Cannot migrate FlowFiles from a Process Session to itself"); } if (flowFiles == null || flowFiles.isEmpty()) { throw new IllegalArgumentException("Must supply at least one FlowFile to migrate"); } if (!(newOwner instanceof MockProcessSession)) { throw new IllegalArgumentException("Cannot migrate from a StandardProcessSession to a session of type " + newOwner.getClass()); } migrate((MockProcessSession) newOwner, (Collection<MockFlowFile>) (Collection) flowFiles); }
@Override @SuppressWarnings({"rawtypes", "unchecked"}) public void migrate(final ProcessSession newOwner, final Collection<FlowFile> flowFiles) { if (Objects.requireNonNull(newOwner) == this) { throw new IllegalArgumentException("Cannot migrate FlowFiles from a Process Session to itself"); } if (flowFiles == null || flowFiles.isEmpty()) { throw new IllegalArgumentException("Must supply at least one FlowFile to migrate"); } if (!(newOwner instanceof MockProcessSession)) { throw new IllegalArgumentException("Cannot migrate from a StandardProcessSession to a session of type " + newOwner.getClass()); } migrate((MockProcessSession) newOwner, (Collection<MockFlowFile>) (Collection) flowFiles); }