### Question:
UserManager { public User createDefaultUser() { User user = new User(); user.setExpSimple(DEFAULT_USER.getExp()); user.setLevelSimple(DEFAULT_USER.getLevel()); user.setBlood(DEFAULT_USER.getBlood()); user.setSkin(DEFAULT_USER.getSkin()); user.setDamage(DEFAULT_USER.getDamage()); user.setTkew(DEFAULT_USER.getTkew()); user.setPowerSimple(DEFAULT_USER.getPower()); user.setAttack(DEFAULT_USER.getAttack()); user.setDefend(DEFAULT_USER.getDefend()); user.setLuck(DEFAULT_USER.getLuck()); user.setAgility(DEFAULT_USER.getAgility()); user.setGoldenSimple(DEFAULT_USER.getGolden()); user.setYuanbaoSimple(0); user.setYuanbaoFreeSimple(DEFAULT_USER.getYuanbaoFree()); user.getBag().addOtherPropDatas(giftPropData.clone()); user.getBag().setWearPropData(basicPropData.clone(), PropDataEquipIndex.WEAPON.index()); return user; } protected  UserManager(); User createDefaultUser(); User createTrainingUser(User realUser); abstract boolean saveUser(User user, boolean isNewUser); abstract boolean saveUserBag(User user, boolean isNewBag); abstract boolean saveUserRelation(Collection<Relation> relations); abstract User queryUser(String userName); abstract User queryUser(UserId userId); abstract BasicUser queryBasicUser(String userName); abstract BasicUser queryBasicUser(UserId userId); abstract Bag queryUserBag(User user); abstract Bag queryUserBag(UserId userId); abstract User queryUserRelation(User user); abstract boolean checkUserNameExist(String userName); static UserManager getInstance(); abstract void removeUser(UserId userId); abstract void removeUser(String userName); abstract User queryUserByRoleName(String roleName); abstract boolean checkRoleNameExist(String roleName); abstract BasicUser queryBasicUserByRoleName(String roleName); abstract boolean checkEmailVerified(UserId userId); abstract Map<RelationType, Collection<People>> saveFriendWinOrLose(User user, 
			User friend, boolean winning); abstract Collection<Unlock> queryUserUnlock(User user); abstract boolean addUserNewUnlock(User user, Unlock unlock); abstract String convertUserToString(User user); abstract User convertStringToUser(String userStr); abstract Bag convertStringToBag(String bagStr); abstract String convertBagToString(Bag bag); static final String getDisplayRoleName(String roleName); abstract ArrayList<BasicUser> queryBasicUserByRoleNameRegex(String roleName); abstract void removeUserByRoleName(String roleName); abstract UserLoginStatus checkUserLoginStatus(UserId userId); abstract String queryUserGuildId(UserId userId); abstract boolean removeUserGuildId(UserId userId); static String basicWeaponItemId; static String basicUserGiftBoxId; }### Answer:
@Test public void testCreateDefaultUser() { UserManager manager = UserManager.getInstance(); User user = manager.createDefaultUser(); List<PropData> weapons = user.getBag().getWearPropDatas(); PropData weapon = weapons.get(PropDataEquipIndex.WEAPON.index()); assertEquals(UserManager.basicWeaponItemId, weapon.getItemId()); WeaponPojo weaponPojo = GameContext.getInstance().getEquipManager().getWeaponById(UserManager.basicWeaponItemId); assertEquals(weaponPojo.getName(),weapon.getName()); assertEquals(Integer.MAX_VALUE,weapon.getPropIndate()); assertEquals(1,weapon.getCount()); assertEquals(0,weapon.getLevel()); assertEquals(weaponPojo.getAddAttack(),weapon.getAttackLev()); assertEquals(weaponPojo.getAddDefend(),weapon.getDefendLev()); assertEquals(weaponPojo.getAddAgility(),weapon.getAgilityLev()); assertEquals(weaponPojo.getAddLuck(),weapon.getLuckLev()); assertEquals(-1,weapon.getSign()); assertEquals(PropDataValueType.GAME,weapon.getValuetype()); assertEquals(true,weapon.isBanded()); assertEquals(1,weapon.getDuration()); assertEquals(PropDataEquipIndex.WEAPON.index(),weapon.getPew()); assertEquals(1, user.getBag().getCurrentCount()); }