@@ -0,0 +1,2229 @@
+package com.twu.biblioteca.user;%0A%0Aimport com.twu.biblioteca.com.twu.biblioteca.exceptions.IncorrectLoginException;%0Aimport com.twu.biblioteca.com.twu.biblioteca.exceptions.InvalidLibraryNumberFormatException;%0Aimport com.twu.biblioteca.com.twu.biblioteca.exceptions.UserAlreadyExistsException;%0Aimport org.junit.After;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertTrue;%0A%0A/**%0A * Created by watsonarw on 25/04/15.%0A */%0Apublic class UsersTest %7B%0A%0A%0A    @Test%0A    public void testUserExistsWhenLibraryNumberInCorrectFormat() %7B%0A        Users u = new Users();%0A        u.addUser(%22123-4567%22, %22super secure password with 223.4 bits of entropy%22);%0A        assertTrue(u.userExists(%22123-4567%22));%0A    %7D%0A%0A    @Test(expected = InvalidLibraryNumberFormatException.class)%0A    public void testUserAccountCreationFailsWithInvalidLibraryNumberFormat() %7B%0A        Users u = new Users();%0A        u.addUser(%223824377%22, %22guest%22);%0A    %7D%0A%0A    @Test(expected = InvalidLibraryNumberFormatException.class)%0A    public void testUserAccountCreationFailsWithInvalidNonNumericalLibraryNumber() %7B%0A        Users u = new Users();%0A        u.addUser(%22qwerty%22, %22qwerty%22);%0A    %7D%0A%0A    @Test(expected = UserAlreadyExistsException.class)%0A    public void testUserAccountCreationFailsWhenUserExists() %7B%0A        Users u = new Users();%0A        u.addUser(%22314-1593%22, %22circle%22);%0A        u.addUser(%22314-1593%22, %22cosine%22);%0A    %7D%0A%0A    @Test%0A    public void testUserCanLogInWithCorrectLibraryNumberAndPassword() throws IncorrectLoginException %7B%0A        Users u = new Users();%0A        u.addUser(%22314-1593%22, %22circle%22);%0A        u.logIn(%22314-1593%22, %22circle%22);%0A        assertEquals(%22314-1593%22, u.getCurrentUser());%0A    %7D%0A%0A    @Test(expected = IncorrectLoginException.class)%0A    public void testLoginWithIncorrectUsernameHasException() throws IncorrectLoginException %7B%0A        Users u = new Users();%0A        u.logIn(%22314-1593%22, %22password%22);%0A    %7D%0A%0A    @Test(expected = IncorrectLoginException.class)%0A    public void testLoginWithIncorrectPasswordHasException() throws IncorrectLoginException %7B%0A        Users u = new Users();%0A        u.addUser(%22314-1593%22, %22circle%22);%0A        u.logIn(%22314-1593%22, %22square%22);%0A    %7D%0A%7D%0A

Add test cases for handling user logins