What does the before annotation do?

What does the before annotation do?

Before each test, methods marked with the @Before annotation are executed. This comes in handy when we need to run some common code before starting a test. Notice that we have included another method with the annotation @When to clear the list after each test is completed.