Understanding the Tests
What does all this mean?!
Tests in Lab 2
Remember to focus on one test at a time!
Before writing any code:
After creating the class:
Tip
Did you remember to include a package statement in your class? Did you remember to build after creating the class file?
After adding mysteryMethodOne():
After changing the return type:
After changing mysteryMethodOne to return 1, the tests pass!
But remember, we arenβt finished yet. We need to actually run the class after it passes the tests! We still have a little work to do, right?




![Terminal output after all tests pass but when trying to run MysteryClassOne directly. The error reads: "Main method not found in class java112.labs1.MysteryClassOne, please define the main method as: public static void main(String[] args)". This means the class compiles and passes tests but still needs a main method to run as a standalone program.](../../images/MysteryClassOneMainMethodMissing.png)