@@ -0,0 +1,1824 @@
+// Copyright 2008 Thiago H. de Paula Figueiredo%0D%0A//%0D%0A// Licensed under the Apache License, Version 2.0 (the %22License%22);%0D%0A// you may not use this file except in compliance with the License.%0D%0A// You may obtain a copy of the License at%0D%0A//%0D%0A//     http://www.apache.org/licenses/LICENSE-2.0%0D%0A//%0D%0A// Unless required by applicable law or agreed to in writing, software%0D%0A// distributed under the License is distributed on an %22AS IS%22 BASIS,%0D%0A// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0D%0A// See the License for the specific language governing permissions and%0D%0A// limitations under the License.%0D%0A%0D%0Apackage br.com.arsmachina.authentication.entity;%0D%0A%0D%0Aimport java.util.ArrayList;%0D%0Aimport java.util.List;%0D%0A%0D%0Aimport org.testng.Assert;%0D%0Aimport org.testng.annotations.Test;%0D%0A%0D%0A/**%0D%0A * Test class for %7B@link User%7D.%0D%0A * %0D%0A * @author Thiago H. de Paula Figueiredo (ThiagoHP)%0D%0A */%0D%0Apublic class UserTest %7B%0D%0A%0D%0A%09@Test%0D%0A%09public void getRoles() %7B%0D%0A%0D%0A%09%09User user = new User();%0D%0A%09%09user.setName(%22Test%22);%0D%0A%0D%0A%09%09new ArrayList%3CPermission%3E();%0D%0A%0D%0A%09%09for (int i = 0; i %3C 2; i++) %7B%0D%0A%09%09%09%0D%0A%09%09%09final PermissionGroup group = new PermissionGroup();%0D%0A%09%09%09group.setName(%22Group %22 + i);%0D%0A%09%09%09user.getPermissionGroups().add(group);%0D%0A%09%09%09%0D%0A%09%09%7D%0D%0A%0D%0A%09%09for (int i = 0; i %3C 8; i++) %7B%0D%0A%0D%0A%09%09%09final Permission permission = new Permission();%0D%0A%09%09%09permission.setName(%22ROLE_%22 + i);%0D%0A%0D%0A%09%09%09user.getPermissionGroups().get(i %25 2).getPermissions().add(permission);%0D%0A%0D%0A%09%09%09if (i %25 4 == 0) %7B%0D%0A%09%09%09%09user.getRemovedPermissions().add(permission);%0D%0A%09%09%09%7D%0D%0A%0D%0A%09%09%7D%0D%0A%0D%0A%09%09List%3CPermission%3E permissions = user.getPermissions(); %0D%0A%0D%0A%09%09Assert.assertEquals(permissions.size(), 6);%0D%0A%0D%0A%09%09for (Permission permission : permissions) %7B%0D%0A%0D%0A%09%09%09Assert.assertFalse(permission.getName().equals(%22ROLE_0%22));%0D%0A%09%09%09Assert.assertFalse(permission.getName().equals(%22ROLE_4%22));%0D%0A%0D%0A%09%09%7D%0D%0A%0D%0A%09%7D%0D%0A%0D%0A%7D%0D%0A

Package change: from net.sf.arsmachina to br.com.arsmachina.