Github user pvillard31 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/534#discussion_r67392290
  
    --- Diff: 
nifi-mock/src/test/java/org/apache/nifi/util/TestMockProcessSession.java ---
    @@ -55,4 +55,35 @@ public void onTrigger(final ProcessContext ctx, final 
ProcessSession session) th
             }
     
         }
    +
    +
    +    @Test(expected = AssertionError.class)
    +    public void testNonExistentRelationFromProcessor() {
    +        
TestRunners.newTestRunner(NonExistentRelationTestProcessor.class).run();
    +    }
    +
    +    protected static class NonExistentRelationTestProcessor extends 
PoorlyBehavedProcessor {
    +
    +            static final Relationship REL_NON_EXISTENT = new 
Relationship.Builder()
    +                    .name("NonExistent Relation")
    +                    .build();
    +
    +            public Set<Relationship> relationships = 
Collections.singleton(REL_FAILURE);
    +
    +            @Override
    +            public Set<Relationship> getRelationships() {
    +                return relationships;
    --- End diff --
    
    I think you just have to return an empty set of relationships instead of 
referencing the one of the other class. No?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to