You need to call Assert.fail() to mark the test case as failed at this position. Otherwise the test will go on and either sucecdd, or produce an error later, which one will have to track back to the setup problem.