ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [04/21] ambari git commit: AMBARI-19149 - Clean up Ambari Server source code warnings (Attila Doroszlai via jonathanhurley)
Date Mon, 12 Dec 2016 17:25:29 GMT
http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/StageDAOTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/StageDAOTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/StageDAOTest.java
index dc7120e..0215a0e 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/StageDAOTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/StageDAOTest.java
@@ -17,11 +17,17 @@
  */
 package org.apache.ambari.server.orm.dao;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-import com.google.inject.persist.PersistService;
-import org.apache.ambari.server.controller.internal.StageResourceProvider;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+
 import org.apache.ambari.server.controller.internal.SortRequestImpl;
+import org.apache.ambari.server.controller.internal.StageResourceProvider;
 import org.apache.ambari.server.controller.spi.Predicate;
 import org.apache.ambari.server.controller.spi.Request;
 import org.apache.ambari.server.controller.spi.SortRequest;
@@ -37,14 +43,9 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.persist.PersistService;
 
 /**
  * StageDAO tests.

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/TopologyLogicalRequestDAOTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/TopologyLogicalRequestDAOTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/TopologyLogicalRequestDAOTest.java
index c878a62..3e7ba68 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/TopologyLogicalRequestDAOTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/TopologyLogicalRequestDAOTest.java
@@ -17,10 +17,10 @@
  */
 package org.apache.ambari.server.orm.dao;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-import com.google.inject.persist.PersistService;
-import junit.framework.Assert;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.orm.GuiceJpaInitializer;
 import org.apache.ambari.server.orm.InMemoryDefaultTestModule;
@@ -37,9 +37,11 @@ import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
 
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.persist.PersistService;
+
+import junit.framework.Assert;
 
 public class TopologyLogicalRequestDAOTest {
   private Injector injector;

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/TopologyRequestDAOTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/TopologyRequestDAOTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/TopologyRequestDAOTest.java
index c489eba..c85dceb 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/TopologyRequestDAOTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/TopologyRequestDAOTest.java
@@ -17,10 +17,10 @@
  */
 package org.apache.ambari.server.orm.dao;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-import com.google.inject.persist.PersistService;
-import junit.framework.Assert;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.orm.GuiceJpaInitializer;
 import org.apache.ambari.server.orm.InMemoryDefaultTestModule;
@@ -31,9 +31,12 @@ import org.apache.ambari.server.orm.entities.TopologyRequestEntity;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.persist.PersistService;
+
+import junit.framework.Assert;
 
 public class TopologyRequestDAOTest {
   private Injector injector;

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/UserDAOTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/UserDAOTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/UserDAOTest.java
index b46f816..a1ca11d 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/UserDAOTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/UserDAOTest.java
@@ -18,15 +18,18 @@
 
 package org.apache.ambari.server.orm.dao;
 
-import com.google.inject.Inject;
-import com.google.inject.Provider;
-import org.junit.Before;
 import static org.easymock.EasyMock.createStrictMock;
 import static org.easymock.EasyMock.expect;
 import static org.easymock.EasyMock.replay;
 import static org.easymock.EasyMock.reset;
+
 import javax.persistence.EntityManager;
 
+import org.junit.Before;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
 /**
  * UserDAO unit tests.
  */

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ViewInstanceDAOTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ViewInstanceDAOTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ViewInstanceDAOTest.java
index 325c953..7f16e86 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ViewInstanceDAOTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ViewInstanceDAOTest.java
@@ -18,13 +18,6 @@
 
 package org.apache.ambari.server.orm.dao;
 
-import com.google.inject.Provider;
-import org.apache.ambari.server.orm.entities.ViewInstanceDataEntity;
-import org.junit.Before;
-import org.junit.Test;
-
-import javax.persistence.EntityManager;
-
 import static org.easymock.EasyMock.createStrictMock;
 import static org.easymock.EasyMock.eq;
 import static org.easymock.EasyMock.expect;
@@ -33,6 +26,14 @@ import static org.easymock.EasyMock.reset;
 import static org.easymock.EasyMock.verify;
 import static org.junit.Assert.assertSame;
 
+import javax.persistence.EntityManager;
+
+import org.apache.ambari.server.orm.entities.ViewInstanceDataEntity;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.google.inject.Provider;
+
 /**
  * ViewInstanceDAO tests.
  */

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/orm/db/DDLTestUtils.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/db/DDLTestUtils.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/db/DDLTestUtils.java
index 7d0e289..cc4d6ba 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/db/DDLTestUtils.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/db/DDLTestUtils.java
@@ -17,20 +17,33 @@
  */
 package org.apache.ambari.server.orm.db;
 
-import com.google.common.base.*;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.base.Charsets;
+import com.google.common.base.Joiner;
 import com.google.common.base.Optional;
+import com.google.common.base.Preconditions;
+import com.google.common.base.Splitter;
 import com.google.common.cache.CacheBuilder;
 import com.google.common.cache.CacheLoader;
 import com.google.common.cache.LoadingCache;
-import com.google.common.collect.*;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
 import com.google.common.io.Resources;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.net.URL;
-import java.util.*;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
 
 /**
  * <p>

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/orm/db/DDLTests.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/db/DDLTests.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/db/DDLTests.java
index 779c937..64fc1fd 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/db/DDLTests.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/db/DDLTests.java
@@ -17,17 +17,22 @@
  */
 package org.apache.ambari.server.orm.db;
 
-import com.google.common.base.Joiner;
-import com.google.common.base.Optional;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Maps;
-import com.google.common.collect.Sets;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
 import org.junit.Assert;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.*;
+import com.google.common.base.Joiner;
+import com.google.common.base.Optional;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
 
 
 /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/BlueprintConfigEntityPKTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/BlueprintConfigEntityPKTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/BlueprintConfigEntityPKTest.java
index 73eb39e..6b73204 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/BlueprintConfigEntityPKTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/BlueprintConfigEntityPKTest.java
@@ -18,11 +18,11 @@
 
 package org.apache.ambari.server.orm.entities;
 
-import org.junit.Test;
-
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 
+import org.junit.Test;
+
 /**
  * BlueprintConfigEntityPK unit tests.
  */

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/BlueprintConfigEntityTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/BlueprintConfigEntityTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/BlueprintConfigEntityTest.java
index ea40f37..0c0e32e 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/BlueprintConfigEntityTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/BlueprintConfigEntityTest.java
@@ -18,11 +18,11 @@
 
 package org.apache.ambari.server.orm.entities;
 
-import org.junit.Test;
-
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertSame;
 
+import org.junit.Test;
+
 /**
  * BlueprintConfigEntity unit tests.
  */

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/BlueprintEntityTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/BlueprintEntityTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/BlueprintEntityTest.java
index 279346b..f95047c 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/BlueprintEntityTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/BlueprintEntityTest.java
@@ -21,7 +21,6 @@ package org.apache.ambari.server.orm.entities;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertSame;
 
-
 import java.util.Collection;
 import java.util.Collections;
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/BlueprintSettingEntityTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/BlueprintSettingEntityTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/BlueprintSettingEntityTest.java
index 507a9111..4681566 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/BlueprintSettingEntityTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/BlueprintSettingEntityTest.java
@@ -18,11 +18,11 @@
 
 package org.apache.ambari.server.orm.entities;
 
-import org.junit.Test;
-
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertSame;
 
+import org.junit.Test;
+
 /**
  * Test all the methods of BlueprintSettingEntity
  */

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/HostEntityTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/HostEntityTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/HostEntityTest.java
index be426db..2f8e1de 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/HostEntityTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/HostEntityTest.java
@@ -17,12 +17,14 @@
  */
 package org.apache.ambari.server.orm.entities;
 
-import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import java.util.Collection;
 import java.util.HashSet;
 
-import static org.junit.Assert.*;
+import org.junit.Test;
 
 /**
  * HostEntity tests.

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/HostGroupComponentEntityTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/HostGroupComponentEntityTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/HostGroupComponentEntityTest.java
index f3104e8..2f5a9b5 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/HostGroupComponentEntityTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/HostGroupComponentEntityTest.java
@@ -18,11 +18,11 @@
 
 package org.apache.ambari.server.orm.entities;
 
-import org.junit.Test;
-
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertSame;
 
+import org.junit.Test;
+
 /**
  * HostGroupComponentEntity unit tests.
  */

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/HostGroupConfigEntityPKTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/HostGroupConfigEntityPKTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/HostGroupConfigEntityPKTest.java
index 277b519..8a95025 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/HostGroupConfigEntityPKTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/HostGroupConfigEntityPKTest.java
@@ -18,11 +18,11 @@
 
 package org.apache.ambari.server.orm.entities;
 
-import org.junit.Test;
-
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 
+import org.junit.Test;
+
 /**
  * HostGroupConfigEntityPK unit tests.
  */

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/HostGroupConfigEntityTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/HostGroupConfigEntityTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/HostGroupConfigEntityTest.java
index 98d8e55..bae7026 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/HostGroupConfigEntityTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/HostGroupConfigEntityTest.java
@@ -18,11 +18,11 @@
 
 package org.apache.ambari.server.orm.entities;
 
-import org.junit.Test;
-
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertSame;
 
+import org.junit.Test;
+
 /**
  * Unit tests for HostGroupConfigEntity.
  */

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/HostGroupEntityTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/HostGroupEntityTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/HostGroupEntityTest.java
index 3ebfacc..7302c87 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/HostGroupEntityTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/HostGroupEntityTest.java
@@ -18,13 +18,13 @@
 
 package org.apache.ambari.server.orm.entities;
 
-import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertSame;
 
 import java.util.Collection;
 import java.util.Collections;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
+import org.junit.Test;
 
 /**
  * HostGroupEntity unit tests.

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/LdapSyncEventEntityTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/LdapSyncEventEntityTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/LdapSyncEventEntityTest.java
index 109988f..2f2fdd7 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/LdapSyncEventEntityTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/LdapSyncEventEntityTest.java
@@ -18,12 +18,12 @@
 
 package org.apache.ambari.server.orm.entities;
 
-import org.junit.Assert;
-import org.junit.Test;
-
 import java.util.Collections;
 import java.util.List;
 
+import org.junit.Assert;
+import org.junit.Test;
+
 /**
  * LdapSyncEventEntity tests.
  */

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/LdapSyncSpecEntityTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/LdapSyncSpecEntityTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/LdapSyncSpecEntityTest.java
index b9e000e..3cc97fe 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/LdapSyncSpecEntityTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/LdapSyncSpecEntityTest.java
@@ -18,13 +18,13 @@
 
 package org.apache.ambari.server.orm.entities;
 
-import org.junit.Assert;
-import org.junit.Test;
-
 import java.util.Collections;
 import java.util.LinkedList;
 import java.util.List;
 
+import org.junit.Assert;
+import org.junit.Test;
+
 /**
  * LdapSyncSpecEntity tests.
  */

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/PrincipalEntityTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/PrincipalEntityTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/PrincipalEntityTest.java
index d9e0540..ce8601a 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/PrincipalEntityTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/PrincipalEntityTest.java
@@ -18,12 +18,12 @@
 
 package org.apache.ambari.server.orm.entities;
 
-import org.junit.Assert;
-import org.junit.Test;
-
 import java.util.HashSet;
 import java.util.Set;
 
+import org.junit.Assert;
+import org.junit.Test;
+
 /**
  * PrincipalEntity tests.
  */

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ResourceEntityTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ResourceEntityTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ResourceEntityTest.java
index 358d957..0f2d31a 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ResourceEntityTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ResourceEntityTest.java
@@ -18,12 +18,12 @@
 
 package org.apache.ambari.server.orm.entities;
 
-import org.junit.Assert;
-import org.junit.Test;
-
 import java.util.Collection;
 import java.util.Collections;
 
+import org.junit.Assert;
+import org.junit.Test;
+
 /**
  * ResourceEntity tests.
  */

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ServiceConfigEntityTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ServiceConfigEntityTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ServiceConfigEntityTest.java
index e12e7ae..0a7ed25 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ServiceConfigEntityTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ServiceConfigEntityTest.java
@@ -18,10 +18,9 @@
 
 package org.apache.ambari.server.orm.entities;
 
-import org.junit.Test;
-
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
+
+import org.junit.Test;
 
 /**
  * ServiceConfigEntity unit tests.

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/SettingEntityTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/SettingEntityTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/SettingEntityTest.java
index defe948..16d0863 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/SettingEntityTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/SettingEntityTest.java
@@ -17,10 +17,10 @@
  */
 package org.apache.ambari.server.orm.entities;
 
-import org.junit.Test;
-
 import static junit.framework.Assert.assertEquals;
 
+import org.junit.Test;
+
 /**
  * SettingEntity unit tests.
  */

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/StageEntityTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/StageEntityTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/StageEntityTest.java
index 4fc66a5..6023fc8 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/StageEntityTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/StageEntityTest.java
@@ -19,10 +19,10 @@
 package org.apache.ambari.server.orm.entities;
 
 
-import org.junit.Test;
-
 import static org.junit.Assert.assertEquals;
 
+import org.junit.Test;
+
 
 /**
  * StageEntity unit tests

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ViewEntityTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ViewEntityTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ViewEntityTest.java
index 1022e7c..281bcc5 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ViewEntityTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ViewEntityTest.java
@@ -17,6 +17,15 @@
  */
 package org.apache.ambari.server.orm.entities;
 
+import static org.easymock.EasyMock.createNiceMock;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.verify;
+
+import java.util.Collection;
+import java.util.Properties;
+import java.util.Set;
+
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.controller.spi.ResourceProvider;
@@ -32,15 +41,6 @@ import org.apache.ambari.view.validation.Validator;
 import org.junit.Assert;
 import org.junit.Test;
 
-import java.util.Collection;
-import java.util.Properties;
-import java.util.Set;
-
-import static org.easymock.EasyMock.createNiceMock;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.replay;
-import static org.easymock.EasyMock.verify;
-
 
 /**
  * ViewEntity tests.

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ViewInstanceEntityTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ViewInstanceEntityTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ViewInstanceEntityTest.java
index 933c4e0..e8c7ed1 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ViewInstanceEntityTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ViewInstanceEntityTest.java
@@ -18,6 +18,15 @@
 
 package org.apache.ambari.server.orm.entities;
 
+import static org.easymock.EasyMock.createNiceMock;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.security.SecurityHelper;
@@ -41,15 +50,6 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.springframework.security.core.GrantedAuthority;
 
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import static org.easymock.EasyMock.createNiceMock;
-
 /**
  * ViewInstanceEntity tests.
  */

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/proxy/ProxyServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/proxy/ProxyServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/proxy/ProxyServiceTest.java
index 4aae20c..8e84bcd 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/proxy/ProxyServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/proxy/ProxyServiceTest.java
@@ -18,41 +18,39 @@
 
 package org.apache.ambari.server.proxy;
 
-import com.google.gson.Gson;
-import com.sun.jersey.core.spi.factory.ResponseBuilderImpl;
-import com.sun.jersey.core.spi.factory.ResponseImpl;
-import com.sun.jersey.core.util.MultivaluedMapImpl;
-
-import org.apache.ambari.server.api.services.BaseServiceTest;
-import org.apache.ambari.server.controller.internal.URLStreamProvider;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import static org.junit.Assert.assertSame;
-import org.powermock.api.easymock.PowerMock;
-import org.powermock.core.classloader.annotations.PrepareForTest;
-import org.powermock.modules.junit4.PowerMockRunner;
-
-import static javax.ws.rs.core.MediaType.APPLICATION_FORM_URLENCODED;
 import static javax.ws.rs.core.MediaType.APPLICATION_FORM_URLENCODED_TYPE;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.MultivaluedMap;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriBuilder;
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
+import static org.junit.Assert.assertSame;
 
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.net.HttpURLConnection;
 import java.net.URI;
-import java.util.Map;
-import java.util.LinkedList;
-import java.util.HashMap;
 import java.util.Collections;
+import java.util.HashMap;
+import java.util.LinkedList;
 import java.util.List;
+import java.util.Map;
 
-import static org.easymock.EasyMock.createMock;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.replay;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriBuilder;
+
+import org.apache.ambari.server.api.services.BaseServiceTest;
+import org.apache.ambari.server.controller.internal.URLStreamProvider;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.powermock.api.easymock.PowerMock;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+import com.google.gson.Gson;
+import com.sun.jersey.core.spi.factory.ResponseBuilderImpl;
+import com.sun.jersey.core.spi.factory.ResponseImpl;
+import com.sun.jersey.core.util.MultivaluedMapImpl;
 
 @RunWith(PowerMockRunner.class)
 @PrepareForTest({ ProxyServiceTest.class, ProxyService.class, URLStreamProvider.class, Response.class,

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionScheduleManagerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionScheduleManagerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionScheduleManagerTest.java
index 0179486..c77f28d 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionScheduleManagerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionScheduleManagerTest.java
@@ -17,16 +17,26 @@
  */
 package org.apache.ambari.server.scheduler;
 
-import com.google.gson.Gson;
-import com.google.inject.Binder;
-import com.google.inject.Guice;
-import com.google.inject.Inject;
-import com.google.inject.Injector;
-import com.google.inject.Module;
-import com.google.inject.persist.PersistService;
-import com.google.inject.persist.Transactional;
-import com.google.inject.util.Modules;
-import junit.framework.Assert;
+import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.capture;
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.createMockBuilder;
+import static org.easymock.EasyMock.createNiceMock;
+import static org.easymock.EasyMock.eq;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.expectLastCall;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.verify;
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.actionmanager.ActionDBAccessor;
 import org.apache.ambari.server.actionmanager.HostRoleStatus;
@@ -66,25 +76,17 @@ import org.quartz.impl.matchers.GroupMatcher;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import com.google.gson.Gson;
+import com.google.inject.Binder;
+import com.google.inject.Guice;
+import com.google.inject.Inject;
+import com.google.inject.Injector;
+import com.google.inject.Module;
+import com.google.inject.persist.PersistService;
+import com.google.inject.persist.Transactional;
+import com.google.inject.util.Modules;
 
-import static org.easymock.EasyMock.anyObject;
-import static org.easymock.EasyMock.capture;
-import static org.easymock.EasyMock.createMock;
-import static org.easymock.EasyMock.createMockBuilder;
-import static org.easymock.EasyMock.createNiceMock;
-import static org.easymock.EasyMock.eq;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.expectLastCall;
-import static org.easymock.EasyMock.replay;
-import static org.easymock.EasyMock.verify;
-import static org.hamcrest.CoreMatchers.instanceOf;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
+import junit.framework.Assert;
 
 public class ExecutionScheduleManagerTest {
   private static Clusters clusters;

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/AmbariLdapUtilsTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/AmbariLdapUtilsTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/AmbariLdapUtilsTest.java
index 5bcdf48..5629913 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/AmbariLdapUtilsTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/AmbariLdapUtilsTest.java
@@ -17,6 +17,16 @@
  */
 package org.apache.ambari.server.security;
 
+import static junit.framework.Assert.assertFalse;
+import static junit.framework.Assert.assertTrue;
+import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.createNiceMock;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+
 import org.apache.ambari.server.security.authorization.AmbariLdapUtils;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -27,16 +37,6 @@ import org.springframework.ldap.core.DirContextAdapter;
 import org.springframework.ldap.core.DistinguishedName;
 import org.springframework.security.ldap.LdapUtils;
 
-import javax.naming.Context;
-import javax.naming.NamingException;
-
-import static junit.framework.Assert.assertFalse;
-import static junit.framework.Assert.assertTrue;
-import static org.easymock.EasyMock.anyObject;
-import static org.easymock.EasyMock.createNiceMock;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.replay;
-
 @RunWith(PowerMockRunner.class)
 @PrepareForTest(LdapUtils.class)
 public class AmbariLdapUtilsTest {

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/SecurePasswordHelperTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/SecurePasswordHelperTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/SecurePasswordHelperTest.java
index 1c61109..91d44a6 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/SecurePasswordHelperTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/SecurePasswordHelperTest.java
@@ -18,12 +18,13 @@
 
 package org.apache.ambari.server.security;
 
-import junit.framework.Assert;
+import java.util.HashSet;
+import java.util.Set;
+
 import org.junit.Before;
 import org.junit.Test;
 
-import java.util.HashSet;
-import java.util.Set;
+import junit.framework.Assert;
 
 public class SecurePasswordHelperTest {
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/SecurityFilterTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/SecurityFilterTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/SecurityFilterTest.java
index c59e868..b48ea94 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/SecurityFilterTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/SecurityFilterTest.java
@@ -18,27 +18,24 @@
 
 package org.apache.ambari.server.security;
 
-import java.io.IOException;
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertNull;
+import static org.easymock.EasyMock.createNiceMock;
 
+import java.io.IOException;
 
-import com.google.inject.Binder;
-import com.google.inject.Module;
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.state.stack.OsFamily;
 import org.junit.Before;
 import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.springframework.mock.web.MockFilterChain;
 import org.springframework.mock.web.MockHttpServletRequest;
 import org.springframework.mock.web.MockHttpServletResponse;
 
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertNull;
-import static org.easymock.EasyMock.createNiceMock;
-
+import com.google.inject.Binder;
 import com.google.inject.Guice;
 import com.google.inject.Injector;
+import com.google.inject.Module;
 
 public class SecurityFilterTest {
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/SecurityHelperImplTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/SecurityHelperImplTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/SecurityHelperImplTest.java
index 3442546..d69d49a 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/SecurityHelperImplTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/SecurityHelperImplTest.java
@@ -18,11 +18,12 @@
 
 package org.apache.ambari.server.security;
 
+import java.util.Collection;
+
 import org.apache.ambari.server.orm.entities.PrincipalEntity;
 import org.apache.ambari.server.orm.entities.UserEntity;
 import org.apache.ambari.server.security.authorization.AmbariUserAuthentication;
 import org.apache.ambari.server.security.authorization.User;
-import org.apache.commons.lang.StringUtils;
 import org.junit.Assert;
 import org.junit.Test;
 import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
@@ -32,8 +33,6 @@ import org.springframework.security.core.context.SecurityContext;
 import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.security.core.userdetails.UserDetails;
 
-import java.util.Collection;
-
 public class SecurityHelperImplTest {
 
   private final String USER_FROM_PRINCIPAL = "user from principal";

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/TestAuthenticationFactory.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/TestAuthenticationFactory.java b/ambari-server/src/test/java/org/apache/ambari/server/security/TestAuthenticationFactory.java
index 12d1ac5..a66a3c9 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/TestAuthenticationFactory.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/TestAuthenticationFactory.java
@@ -18,6 +18,12 @@
 
 package org.apache.ambari.server.security;
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.Set;
+
 import org.apache.ambari.server.orm.entities.PermissionEntity;
 import org.apache.ambari.server.orm.entities.PrivilegeEntity;
 import org.apache.ambari.server.orm.entities.ResourceEntity;
@@ -29,12 +35,6 @@ import org.apache.ambari.server.security.authorization.RoleAuthorization;
 import org.springframework.security.core.Authentication;
 import org.springframework.security.core.GrantedAuthority;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.EnumSet;
-import java.util.Set;
-
 public class TestAuthenticationFactory {
   public static Authentication createAdministrator() {
     return createAdministrator("admin");

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/AmbariBasicAuthenticationFilterTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/AmbariBasicAuthenticationFilterTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/AmbariBasicAuthenticationFilterTest.java
index 7344b62..7e36128 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/AmbariBasicAuthenticationFilterTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/AmbariBasicAuthenticationFilterTest.java
@@ -17,6 +17,13 @@
  */
 package org.apache.ambari.server.security.authentication;
 
+import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.expectLastCall;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.verify;
+
 import java.io.IOException;
 import java.util.Arrays;
 import java.util.HashMap;
@@ -27,26 +34,20 @@ import javax.servlet.FilterChain;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import org.apache.ambari.server.audit.event.AuditEvent;
+
 import org.apache.ambari.server.audit.AuditLogger;
+import org.apache.ambari.server.audit.event.AuditEvent;
 import org.apache.ambari.server.security.AmbariEntryPoint;
 import org.apache.ambari.server.security.authorization.AuthorizationHelper;
 import org.apache.ambari.server.security.authorization.PermissionHelper;
+import org.junit.Before;
+import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.powermock.api.easymock.PowerMock;
 import org.powermock.core.classloader.annotations.PrepareForTest;
 import org.powermock.modules.junit4.PowerMockRunner;
 import org.springframework.security.core.Authentication;
 import org.springframework.security.core.AuthenticationException;
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.easymock.EasyMock.anyObject;
-import static org.easymock.EasyMock.createMock;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.expectLastCall;
-import static org.easymock.EasyMock.replay;
-import static org.easymock.EasyMock.verify;
 import org.springframework.security.crypto.codec.Base64;
 
 @RunWith(PowerMockRunner.class)

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/AmbariDelegatingAuthenticationFilterTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/AmbariDelegatingAuthenticationFilterTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/AmbariDelegatingAuthenticationFilterTest.java
index d775136..cf1be4b 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/AmbariDelegatingAuthenticationFilterTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/AmbariDelegatingAuthenticationFilterTest.java
@@ -18,18 +18,19 @@
 
 package org.apache.ambari.server.security.authentication;
 
-import org.easymock.EasyMockSupport;
-import org.junit.Test;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.expectLastCall;
+
+import java.util.Arrays;
 
 import javax.servlet.Filter;
 import javax.servlet.FilterChain;
 import javax.servlet.FilterConfig;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import java.util.Arrays;
 
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.expectLastCall;
+import org.easymock.EasyMockSupport;
+import org.junit.Test;
 
 public class AmbariDelegatingAuthenticationFilterTest extends EasyMockSupport {
   @Test

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/AmbariJWTAuthenticationFilterTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/AmbariJWTAuthenticationFilterTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/AmbariJWTAuthenticationFilterTest.java
index f042a70..de5b768 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/AmbariJWTAuthenticationFilterTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/AmbariJWTAuthenticationFilterTest.java
@@ -18,12 +18,23 @@
 
 package org.apache.ambari.server.security.authentication;
 
-import com.nimbusds.jose.JOSEException;
-import com.nimbusds.jose.JWSAlgorithm;
-import com.nimbusds.jose.JWSHeader;
-import com.nimbusds.jose.crypto.RSASSASigner;
-import com.nimbusds.jwt.JWTClaimsSet;
-import com.nimbusds.jwt.SignedJWT;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.expectLastCall;
+
+import java.security.KeyPair;
+import java.security.KeyPairGenerator;
+import java.security.NoSuchAlgorithmException;
+import java.security.interfaces.RSAPrivateKey;
+import java.security.interfaces.RSAPublicKey;
+import java.util.Calendar;
+import java.util.Collections;
+import java.util.Date;
+
+import javax.servlet.FilterChain;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
 import org.apache.ambari.server.audit.AuditLogger;
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.security.AmbariEntryPoint;
@@ -36,22 +47,12 @@ import org.easymock.EasyMockSupport;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-import javax.servlet.FilterChain;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import java.security.KeyPair;
-import java.security.KeyPairGenerator;
-import java.security.NoSuchAlgorithmException;
-import java.security.interfaces.RSAPrivateKey;
-import java.security.interfaces.RSAPublicKey;
-import java.util.Calendar;
-import java.util.Collections;
-import java.util.Date;
-
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.expectLastCall;
+import com.nimbusds.jose.JOSEException;
+import com.nimbusds.jose.JWSAlgorithm;
+import com.nimbusds.jose.JWSHeader;
+import com.nimbusds.jose.crypto.RSASSASigner;
+import com.nimbusds.jwt.JWTClaimsSet;
+import com.nimbusds.jwt.SignedJWT;
 
 public class AmbariJWTAuthenticationFilterTest extends EasyMockSupport {
   private static RSAPublicKey publicKey;

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/kerberos/AmbariAuthToLocalUserDetailsServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/kerberos/AmbariAuthToLocalUserDetailsServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/kerberos/AmbariAuthToLocalUserDetailsServiceTest.java
index 41664fd..530bf65 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/kerberos/AmbariAuthToLocalUserDetailsServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/kerberos/AmbariAuthToLocalUserDetailsServiceTest.java
@@ -18,7 +18,11 @@
 
 package org.apache.ambari.server.security.authentication.kerberos;
 
-import junit.framework.Assert;
+import static org.easymock.EasyMock.expect;
+
+import java.util.Collection;
+import java.util.Collections;
+
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.security.authorization.AmbariGrantedAuthority;
 import org.apache.ambari.server.security.authorization.User;
@@ -31,10 +35,7 @@ import org.springframework.security.core.userdetails.UserDetails;
 import org.springframework.security.core.userdetails.UserDetailsService;
 import org.springframework.security.core.userdetails.UsernameNotFoundException;
 
-import java.util.Collection;
-import java.util.Collections;
-
-import static org.easymock.EasyMock.expect;
+import junit.framework.Assert;
 
 public class AmbariAuthToLocalUserDetailsServiceTest extends EasyMockSupport {
   @Before

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/kerberos/AmbariKerberosAuthenticationFilterTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/kerberos/AmbariKerberosAuthenticationFilterTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/kerberos/AmbariKerberosAuthenticationFilterTest.java
index d855cda..5503fac 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/kerberos/AmbariKerberosAuthenticationFilterTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/kerberos/AmbariKerberosAuthenticationFilterTest.java
@@ -18,6 +18,10 @@
 
 package org.apache.ambari.server.security.authentication.kerberos;
 
+import static org.easymock.EasyMock.expect;
+
+import javax.servlet.http.HttpServletRequest;
+
 import org.apache.ambari.server.audit.AuditLogger;
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.security.authorization.PermissionHelper;
@@ -27,10 +31,6 @@ import org.junit.Test;
 import org.springframework.security.authentication.AuthenticationManager;
 import org.springframework.security.web.AuthenticationEntryPoint;
 
-import javax.servlet.http.HttpServletRequest;
-
-import static org.easymock.EasyMock.expect;
-
 public class AmbariKerberosAuthenticationFilterTest extends EasyMockSupport {
   @Test
   public void shouldApplyTrue() throws Exception {

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/kerberos/AmbariKerberosAuthenticationPropertiesTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/kerberos/AmbariKerberosAuthenticationPropertiesTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/kerberos/AmbariKerberosAuthenticationPropertiesTest.java
index d5ffc73..9096897 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/kerberos/AmbariKerberosAuthenticationPropertiesTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/kerberos/AmbariKerberosAuthenticationPropertiesTest.java
@@ -18,14 +18,14 @@
 
 package org.apache.ambari.server.security.authentication.kerberos;
 
-import org.apache.ambari.server.security.authorization.UserType;
-import org.junit.Assert;
-import org.junit.Test;
-
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
 
+import org.apache.ambari.server.security.authorization.UserType;
+import org.junit.Assert;
+import org.junit.Test;
+
 public class AmbariKerberosAuthenticationPropertiesTest {
   @Test
   public void testKerberosAuthenticationEnabled() throws Exception {

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/kerberos/AmbariKerberosTicketValidatorTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/kerberos/AmbariKerberosTicketValidatorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/kerberos/AmbariKerberosTicketValidatorTest.java
index 9bc87a4..197707a 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/kerberos/AmbariKerberosTicketValidatorTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authentication/kerberos/AmbariKerberosTicketValidatorTest.java
@@ -18,12 +18,12 @@
 
 package org.apache.ambari.server.security.authentication.kerberos;
 
+import static org.easymock.EasyMock.expect;
+
 import org.apache.ambari.server.configuration.Configuration;
 import org.easymock.EasyMockSupport;
 import org.junit.Test;
 
-import static org.easymock.EasyMock.expect;
-
 public class AmbariKerberosTicketValidatorTest extends EasyMockSupport {
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariAuthenticationTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariAuthenticationTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariAuthenticationTest.java
index d8c6be8..a8810dd 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariAuthenticationTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariAuthenticationTest.java
@@ -17,6 +17,13 @@
  */
 package org.apache.ambari.server.security.authorization;
 
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertSame;
+import static org.easymock.EasyMock.eq;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.expectLastCall;
+import static org.easymock.EasyMock.verify;
+
 import java.security.Principal;
 import java.util.Collection;
 import java.util.Collections;
@@ -39,13 +46,6 @@ import org.springframework.web.context.request.ServletRequestAttributes;
 
 import nl.jqno.equalsverifier.EqualsVerifier;
 
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertSame;
-import static org.easymock.EasyMock.eq;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.expectLastCall;
-import static org.easymock.EasyMock.verify;
-
 public class AmbariAuthenticationTest extends EasyMockSupport {
 
   private final Integer DEFAULT_USER_ID = 0;

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilterTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilterTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilterTest.java
index 5031473..0ab75c5 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilterTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariAuthorizationFilterTest.java
@@ -18,13 +18,21 @@
 
 package org.apache.ambari.server.security.authorization;
 
-import com.google.common.collect.HashBasedTable;
-import com.google.common.collect.Table;
-import com.google.common.collect.Table.Cell;
-import com.google.inject.AbstractModule;
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-import junit.framework.Assert;
+import static org.easymock.EasyMock.createMockBuilder;
+import static org.easymock.EasyMock.createNiceMock;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.verify;
+
+import java.util.Collections;
+
+import javax.persistence.EntityManager;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 
 import org.apache.ambari.server.audit.AuditLogger;
 import org.apache.ambari.server.configuration.Configuration;
@@ -44,20 +52,14 @@ import org.springframework.security.core.context.SecurityContext;
 import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.security.crypto.password.PasswordEncoder;
 
-import javax.persistence.EntityManager;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.util.Collections;
+import com.google.common.collect.HashBasedTable;
+import com.google.common.collect.Table;
+import com.google.common.collect.Table.Cell;
+import com.google.inject.AbstractModule;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
 
-import static org.easymock.EasyMock.createMockBuilder;
-import static org.easymock.EasyMock.createNiceMock;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.replay;
-import static org.easymock.EasyMock.verify;
+import junit.framework.Assert;
 
 public class AmbariAuthorizationFilterTest {
   @After

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderForDNWithSpaceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderForDNWithSpaceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderForDNWithSpaceTest.java
index 7136472..c18eef5 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderForDNWithSpaceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapAuthenticationProviderForDNWithSpaceTest.java
@@ -17,14 +17,10 @@
  */
 package org.apache.ambari.server.security.authorization;
 
-import java.util.Properties;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
 
-import com.google.inject.Guice;
-import com.google.inject.Inject;
-import com.google.inject.Injector;
-import com.google.inject.persist.PersistService;
-import com.google.inject.persist.jpa.AmbariJpaPersistModule;
-import com.google.inject.persist.jpa.AmbariJpaPersistService;
+import java.util.Properties;
 
 import org.apache.ambari.server.audit.AuditLoggerModule;
 import org.apache.ambari.server.configuration.Configuration;
@@ -39,12 +35,17 @@ import org.apache.directory.server.core.annotations.ContextEntry;
 import org.apache.directory.server.core.annotations.CreateDS;
 import org.apache.directory.server.core.annotations.CreatePartition;
 import org.apache.directory.server.core.integ.FrameworkRunner;
-import org.junit.*;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
 import org.springframework.security.core.Authentication;
 
-import static org.junit.Assert.*;
+import com.google.inject.Guice;
+import com.google.inject.Inject;
+import com.google.inject.Injector;
+import com.google.inject.persist.PersistService;
 
 @RunWith(FrameworkRunner.class)
 @CreateDS(allowAnonAccess = true,

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapBindAuthenticatorTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapBindAuthenticatorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapBindAuthenticatorTest.java
index aed6b57..fcaae37 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapBindAuthenticatorTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLdapBindAuthenticatorTest.java
@@ -17,13 +17,23 @@
  */
 package org.apache.ambari.server.security.authorization;
 
+import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.anyString;
+import static org.easymock.EasyMock.eq;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.expectLastCall;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.util.Properties;
+
 import javax.naming.NamingEnumeration;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 import javax.naming.ldap.LdapName;
-import java.util.Properties;
+
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.commons.lang.StringUtils;
 import org.easymock.EasyMockSupport;
@@ -37,14 +47,6 @@ import org.springframework.web.context.request.RequestAttributes;
 import org.springframework.web.context.request.RequestContextHolder;
 import org.springframework.web.context.request.ServletRequestAttributes;
 
-import static org.easymock.EasyMock.anyObject;
-import static org.easymock.EasyMock.anyString;
-import static org.easymock.EasyMock.eq;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.expectLastCall;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
 public class AmbariLdapBindAuthenticatorTest extends EasyMockSupport {
 
   @Test

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLocalUserProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLocalUserProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLocalUserProviderTest.java
index f3fcca4..4ab7a5a 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLocalUserProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariLocalUserProviderTest.java
@@ -17,9 +17,14 @@
  */
 package org.apache.ambari.server.security.authorization;
 
-import com.google.inject.Guice;
-import com.google.inject.Inject;
-import com.google.inject.Injector;
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.verify;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
 import org.apache.ambari.server.audit.AuditLoggerModule;
 import org.apache.ambari.server.orm.GuiceJpaInitializer;
 import org.apache.ambari.server.orm.OrmTestHelper;
@@ -33,13 +38,9 @@ import org.springframework.security.core.Authentication;
 import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.security.crypto.password.PasswordEncoder;
 
-import static org.easymock.EasyMock.createMock;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.replay;
-import static org.easymock.EasyMock.verify;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import com.google.inject.Guice;
+import com.google.inject.Inject;
+import com.google.inject.Injector;
 
 public class AmbariLocalUserProviderTest {
   private static Injector injector;

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariUserAuthenticationFilterTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariUserAuthenticationFilterTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariUserAuthenticationFilterTest.java
index 80a66fd..6541a59 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariUserAuthenticationFilterTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AmbariUserAuthenticationFilterTest.java
@@ -18,25 +18,6 @@
 
 package org.apache.ambari.server.security.authorization;
 
-import org.apache.ambari.server.orm.entities.PrincipalEntity;
-import org.apache.ambari.server.orm.entities.UserEntity;
-import org.apache.ambari.server.scheduler.ExecutionScheduleManager;
-import org.apache.ambari.server.security.authorization.internal.InternalTokenClientFilter;
-import org.apache.ambari.server.security.authorization.internal.InternalTokenStorage;
-import org.apache.commons.lang.StringUtils;
-import org.easymock.Capture;
-import org.junit.Before;
-import org.junit.Test;
-import org.springframework.security.core.Authentication;
-import org.springframework.security.core.context.SecurityContextHolder;
-
-import javax.servlet.FilterChain;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.util.HashSet;
-
 import static org.easymock.EasyMock.capture;
 import static org.easymock.EasyMock.createMock;
 import static org.easymock.EasyMock.eq;
@@ -49,6 +30,25 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 
+import java.io.IOException;
+import java.util.HashSet;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.ambari.server.orm.entities.PrincipalEntity;
+import org.apache.ambari.server.orm.entities.UserEntity;
+import org.apache.ambari.server.scheduler.ExecutionScheduleManager;
+import org.apache.ambari.server.security.authorization.internal.InternalTokenClientFilter;
+import org.apache.ambari.server.security.authorization.internal.InternalTokenStorage;
+import org.easymock.Capture;
+import org.junit.Before;
+import org.junit.Test;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContextHolder;
+
 public class AmbariUserAuthenticationFilterTest {
   private static final String TEST_INTERNAL_TOKEN = "test token";
   private static final String TEST_USER_ID_HEADER = "1";

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AuthorizationHelperInitializer.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AuthorizationHelperInitializer.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AuthorizationHelperInitializer.java
index 532cb21..6e8f9e0 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AuthorizationHelperInitializer.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AuthorizationHelperInitializer.java
@@ -18,14 +18,15 @@
 
 package org.apache.ambari.server.security.authorization;
 
-import com.google.inject.Provider;
-import org.apache.ambari.server.orm.dao.ViewInstanceDAO;
-
 import static org.easymock.EasyMock.anyLong;
 import static org.easymock.EasyMock.createNiceMock;
 import static org.easymock.EasyMock.expect;
 import static org.easymock.EasyMock.replay;
 
+import org.apache.ambari.server.orm.dao.ViewInstanceDAO;
+
+import com.google.inject.Provider;
+
 /**
  * Test helper to set DAO object to static variables and set proper expectation in AuthenticationHelper
  */

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AuthorizationHelperTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AuthorizationHelperTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AuthorizationHelperTest.java
index d376d4b..7fb8867 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AuthorizationHelperTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AuthorizationHelperTest.java
@@ -17,9 +17,24 @@
  */
 package org.apache.ambari.server.security.authorization;
 
-import com.google.common.collect.Lists;
-import com.google.inject.AbstractModule;
-import com.google.inject.Provider;
+import static org.easymock.EasyMock.eq;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.expectLastCall;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.reset;
+import static org.easymock.EasyMock.verify;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.HashSet;
+import java.util.Set;
+
 import org.apache.ambari.server.orm.dao.PrivilegeDAO;
 import org.apache.ambari.server.orm.dao.ViewInstanceDAO;
 import org.apache.ambari.server.orm.entities.PermissionEntity;
@@ -29,7 +44,6 @@ import org.apache.ambari.server.orm.entities.PrivilegeEntity;
 import org.apache.ambari.server.orm.entities.ResourceEntity;
 import org.apache.ambari.server.orm.entities.ResourceTypeEntity;
 import org.apache.ambari.server.orm.entities.RoleAuthorizationEntity;
-import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
 import org.apache.ambari.server.orm.entities.UserEntity;
 import org.easymock.EasyMockRule;
 import org.easymock.EasyMockSupport;
@@ -49,23 +63,7 @@ import org.springframework.web.context.request.RequestAttributes;
 import org.springframework.web.context.request.RequestContextHolder;
 import org.springframework.web.context.request.ServletRequestAttributes;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.EnumSet;
-import java.util.HashSet;
-import java.util.Set;
-
-import static org.easymock.EasyMock.eq;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.expectLastCall;
-import static org.easymock.EasyMock.replay;
-import static org.easymock.EasyMock.reset;
-import static org.easymock.EasyMock.verify;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import com.google.inject.Provider;
 
 public class AuthorizationHelperTest  extends EasyMockSupport {
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/LdapServerPropertiesTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/LdapServerPropertiesTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/LdapServerPropertiesTest.java
index 072905a..6afb58d 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/LdapServerPropertiesTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/LdapServerPropertiesTest.java
@@ -17,20 +17,20 @@
  */
 package org.apache.ambari.server.security.authorization;
 
-import com.google.inject.Guice;
-import com.google.inject.Inject;
-import com.google.inject.Injector;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.List;
 
 import org.apache.ambari.server.audit.AuditLoggerModule;
 import org.apache.ambari.server.configuration.Configuration;
 import org.junit.Before;
 import org.junit.Test;
 
-import java.util.List;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import com.google.inject.Guice;
+import com.google.inject.Inject;
+import com.google.inject.Injector;
 
 public class LdapServerPropertiesTest {
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/ResourceTypeTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/ResourceTypeTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/ResourceTypeTest.java
index cd085c4..43a46f4 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/ResourceTypeTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/ResourceTypeTest.java
@@ -18,9 +18,9 @@
 
 package org.apache.ambari.server.security.authorization;
 
-import org.junit.Test;
+import static org.junit.Assert.assertEquals;
 
-import static org.junit.Assert.*;
+import org.junit.Test;
 
 public class ResourceTypeTest {
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/RoleAuthorizationTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/RoleAuthorizationTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/RoleAuthorizationTest.java
index 5488e13..5df288e 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/RoleAuthorizationTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/RoleAuthorizationTest.java
@@ -18,9 +18,9 @@
 
 package org.apache.ambari.server.security.authorization;
 
-import org.junit.Test;
+import static org.junit.Assert.assertEquals;
 
-import static org.junit.Assert.*;
+import org.junit.Test;
 
 public class RoleAuthorizationTest {
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/TestAmbariLdapAuthoritiesPopulator.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/TestAmbariLdapAuthoritiesPopulator.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/TestAmbariLdapAuthoritiesPopulator.java
index 0ba766b..5715906 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/TestAmbariLdapAuthoritiesPopulator.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/TestAmbariLdapAuthoritiesPopulator.java
@@ -17,6 +17,12 @@
  */
 package org.apache.ambari.server.security.authorization;
 
+import static org.easymock.EasyMock.expect;
+
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
 import org.apache.ambari.server.orm.dao.MemberDAO;
 import org.apache.ambari.server.orm.dao.PrivilegeDAO;
 import org.apache.ambari.server.orm.dao.UserDAO;
@@ -35,11 +41,6 @@ import org.powermock.core.classloader.annotations.PrepareForTest;
 import org.powermock.modules.junit4.PowerMockRunner;
 import org.springframework.ldap.core.DirContextOperations;
 
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-import static org.easymock.EasyMock.*;
-
 @RunWith(PowerMockRunner.class)               // Allow mocking static methods
 @PrepareForTest(AuthorizationHelper.class)    // This class has a static method that will be mocked
 public class TestAmbariLdapAuthoritiesPopulator extends EasyMockSupport {

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/TestUsers.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/TestUsers.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/TestUsers.java
index 7d112fc..e15c648 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/TestUsers.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/TestUsers.java
@@ -17,7 +17,6 @@
  */
 package org.apache.ambari.server.security.authorization;
 
-import junit.framework.Assert;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNotSame;
@@ -57,6 +56,8 @@ import com.google.inject.Inject;
 import com.google.inject.Injector;
 import com.google.inject.persist.PersistService;
 
+import junit.framework.Assert;
+
 public class TestUsers {
   private Injector injector;
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/UsersTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/UsersTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/UsersTest.java
index 6ba384c..0364213 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/UsersTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/UsersTest.java
@@ -18,15 +18,19 @@
 
 package org.apache.ambari.server.security.authorization;
 
-import com.google.inject.AbstractModule;
-import com.google.inject.Guice;
-import com.google.inject.Injector;
+import static org.easymock.EasyMock.capture;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.newCapture;
 
-import junit.framework.Assert;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+import javax.persistence.EntityManager;
 
 import org.apache.ambari.server.hooks.HookContextFactory;
 import org.apache.ambari.server.hooks.HookService;
-import org.apache.ambari.server.hooks.users.UserHookService;
 import org.apache.ambari.server.orm.DBAccessor;
 import org.apache.ambari.server.orm.dao.MemberDAO;
 import org.apache.ambari.server.orm.dao.PrivilegeDAO;
@@ -39,21 +43,15 @@ import org.apache.ambari.server.orm.entities.PrivilegeEntity;
 import org.apache.ambari.server.orm.entities.UserEntity;
 import org.apache.ambari.server.state.stack.OsFamily;
 import org.easymock.Capture;
-import org.easymock.CaptureType;
 import org.easymock.EasyMockSupport;
 import org.junit.Test;
 import org.springframework.security.crypto.password.PasswordEncoder;
 
-import javax.persistence.EntityManager;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
+import com.google.inject.AbstractModule;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
 
-import static org.easymock.EasyMock.capture;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.newCapture;
+import junit.framework.Assert;
 
 public class UsersTest extends EasyMockSupport {
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/jwt/JwtAuthenticationFilterTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/jwt/JwtAuthenticationFilterTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/jwt/JwtAuthenticationFilterTest.java
index 5814203..24f5f88 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/jwt/JwtAuthenticationFilterTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/jwt/JwtAuthenticationFilterTest.java
@@ -18,13 +18,32 @@
 
 package org.apache.ambari.server.security.authorization.jwt;
 
-import com.nimbusds.jose.JOSEException;
-import com.nimbusds.jose.JWSAlgorithm;
-import com.nimbusds.jose.JWSHeader;
-import com.nimbusds.jose.crypto.RSASSASigner;
-import com.nimbusds.jwt.JWTClaimsSet;
-import com.nimbusds.jwt.SignedJWT;
-import junit.framework.Assert;
+import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.createMockBuilder;
+import static org.easymock.EasyMock.createNiceMock;
+import static org.easymock.EasyMock.eq;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.expectLastCall;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.verify;
+import static org.junit.Assert.assertEquals;
+
+import java.security.KeyPair;
+import java.security.KeyPairGenerator;
+import java.security.NoSuchAlgorithmException;
+import java.security.interfaces.RSAPrivateKey;
+import java.security.interfaces.RSAPublicKey;
+import java.util.Calendar;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+
+import javax.servlet.FilterChain;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
 import org.apache.ambari.server.security.authorization.AmbariGrantedAuthority;
 import org.apache.ambari.server.security.authorization.AuthorizationHelper;
 import org.apache.ambari.server.security.authorization.User;
@@ -37,31 +56,14 @@ import org.springframework.security.core.Authentication;
 import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.security.web.AuthenticationEntryPoint;
 
-import javax.servlet.FilterChain;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import java.security.KeyPair;
-import java.security.KeyPairGenerator;
-import java.security.NoSuchAlgorithmException;
-import java.security.interfaces.RSAPrivateKey;
-import java.security.interfaces.RSAPublicKey;
-import java.util.Calendar;
-import java.util.Collections;
-import java.util.Date;
-import java.util.List;
+import com.nimbusds.jose.JOSEException;
+import com.nimbusds.jose.JWSAlgorithm;
+import com.nimbusds.jose.JWSHeader;
+import com.nimbusds.jose.crypto.RSASSASigner;
+import com.nimbusds.jwt.JWTClaimsSet;
+import com.nimbusds.jwt.SignedJWT;
 
-import static org.easymock.EasyMock.anyObject;
-import static org.easymock.EasyMock.createMockBuilder;
-import static org.easymock.EasyMock.createMock;
-import static org.easymock.EasyMock.createNiceMock;
-import static org.easymock.EasyMock.eq;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.expectLastCall;
-import static org.easymock.EasyMock.replay;
-import static org.easymock.EasyMock.verify;
-import static org.junit.Assert.*;
+import junit.framework.Assert;
 
 public class JwtAuthenticationFilterTest {
   private static RSAPublicKey publicKey;

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/jwt/JwtAuthenticationPropertiesTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/jwt/JwtAuthenticationPropertiesTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/jwt/JwtAuthenticationPropertiesTest.java
index a2109a2..144d90a 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/jwt/JwtAuthenticationPropertiesTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/authorization/jwt/JwtAuthenticationPropertiesTest.java
@@ -18,12 +18,12 @@
 
 package org.apache.ambari.server.security.authorization.jwt;
 
-import org.junit.Test;
-
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 
+import org.junit.Test;
+
 public class JwtAuthenticationPropertiesTest {
 
   @Test

http://git-wip-us.apache.org/repos/asf/ambari/blob/e4db5709/ambari-server/src/test/java/org/apache/ambari/server/security/encryption/AESEncryptorTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/encryption/AESEncryptorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/encryption/AESEncryptorTest.java
index 99fe77e..847bc94 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/encryption/AESEncryptorTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/encryption/AESEncryptorTest.java
@@ -17,9 +17,10 @@
  */
 package org.apache.ambari.server.security.encryption;
 
+import org.junit.Test;
+
 import junit.framework.Assert;
 import junit.framework.TestCase;
-import org.junit.Test;
 
 public class AESEncryptorTest extends TestCase {
 


Mime
View raw message