Completed functionalities for 5. homework. Must comment add add mockito.