Rearrange test logic to avoid reference to null (#862)
Rearrange test logic to avoid reference to null (#862)

Signed-off-by: Stephen Brawner <b1d598fdd857fd94ea5d1ed6be6151604c16b92a@gmail.com>
ros2/rcl,ros2/rcl