NIFI-51 fixed if/else logic/order
Merge remote-tracking branch 'origin/develop' into develop
NIFI-51 made a test a little nicer about cleanup as it kept messing up the build and addressed the possible NPE/ordering logic for 51