/*
 * This source file is subject to the license that is bundled with this package in the file LICENSE.
 */
package com.codeup.auth.actions;

import com.codeup.auth.User;
import com.codeup.auth.Users;

public class SignUpUser {
    private Users users;

    public SignUpUser(Users users) {
        this.users = users;
    }

    public void signUp(String username, String plainTextPassword) {
        if (users.identifiedBy(username) != null) {
            throw DuplicateUser.with(username);
        }
        User user = User.signUp(username, plainTextPassword);
        users.add(user);
    }
}

@@ -440,22 +440,8 @@
 ull)
- %7B%0A           
  thr
@@ -477,17 +477,8 @@
 e);%0A
-        %7D
 %0A   
@@ -486,20 +486,18 @@
     
-User user = 
+users.add(
 User
@@ -536,32 +536,8 @@
 ord)
-;%0A        users.add(user
 );%0A 

Refactor SignUpUser class