ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [09/51] [abbrv] ambari git commit: AMBARI-19149. Code cleanup: compiler warnings (Attila Doroszlai via ncole)
Date Fri, 16 Dec 2016 22:02:17 GMT
http://git-wip-us.apache.org/repos/asf/ambari/blob/edce0b11/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java
index d217456..6143cf8 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/ldap/AmbariLdapDataPopulatorTest.java
@@ -259,7 +259,7 @@ public class AmbariLdapDataPopulatorTest {
     LdapTemplate ldapTemplate = createNiceMock(LdapTemplate.class);
     LdapServerProperties ldapServerProperties = createNiceMock(LdapServerProperties.class);
     expect(users.getAllGroups()).andReturn(groupList);
-    expect(users.getAllUsers()).andReturn(Collections.EMPTY_LIST);
+    expect(users.getAllUsers()).andReturn(Collections.<User>emptyList());
 
     replay(ldapTemplate, ldapServerProperties, users, configuration);
     replay(group1, group2, group3, group4, group5);
@@ -270,13 +270,13 @@ public class AmbariLdapDataPopulatorTest {
         .withConstructor(configuration, users)
         .createNiceMock();
 
-    expect(populator.getLdapGroups("group2")).andReturn(Collections.EMPTY_SET);
+    expect(populator.getLdapGroups("group2")).andReturn(Collections.<LdapGroupDto>emptySet());
     LdapGroupDto externalGroup1 = createNiceMock(LdapGroupDto.class);
     LdapBatchDto batchInfo = new LdapBatchDto();
-    populator.refreshGroupMembers(eq(batchInfo), eq(externalGroup1), anyObject(Map.class), anyObject(Map.class), anyObject(Set.class), anyBoolean());
+    populator.refreshGroupMembers(eq(batchInfo), eq(externalGroup1), EasyMock.<Map<String, User>>anyObject(), EasyMock.<Map<String, Group>>anyObject(), EasyMock.<Set<String>>anyObject(), anyBoolean());
     expectLastCall();
     expect(populator.getLdapGroups("group4")).andReturn(Collections.singleton(externalGroup1));
-    expect(populator.getLdapGroups("group5")).andReturn(Collections.EMPTY_SET);
+    expect(populator.getLdapGroups("group5")).andReturn(Collections.<LdapGroupDto>emptySet());
     replay(populator);
 
     populator.setLdapTemplate(ldapTemplate);
@@ -313,7 +313,7 @@ public class AmbariLdapDataPopulatorTest {
     Configuration configuration = createNiceMock(Configuration.class);
     Users users = createNiceMock(Users.class);
     expect(users.getAllGroups()).andReturn(Arrays.asList(group1, group2));
-    expect(users.getAllUsers()).andReturn(Collections.EMPTY_LIST);
+    expect(users.getAllUsers()).andReturn(Collections.<User>emptyList());
     expect(configuration.getLdapServerProperties()).andReturn(new LdapServerProperties()).anyTimes();
 
     LdapGroupDto group1Dto = new LdapGroupDto();
@@ -324,7 +324,7 @@ public class AmbariLdapDataPopulatorTest {
 
     LdapGroupDto group2Dto = new LdapGroupDto();
     group2Dto.setGroupName("group2");
-    group2Dto.setMemberAttributes(Collections.EMPTY_SET);
+    group2Dto.setMemberAttributes(Collections.<String>emptySet());
     Set<LdapGroupDto> groupDtos2 = Sets.newHashSet();
     groupDtos2.add(group2Dto);
 
@@ -373,7 +373,7 @@ public class AmbariLdapDataPopulatorTest {
     LdapTemplate ldapTemplate = createNiceMock(LdapTemplate.class);
     LdapServerProperties ldapServerProperties = createNiceMock(LdapServerProperties.class);
     expect(users.getAllGroups()).andReturn(groupList);
-    expect(users.getAllUsers()).andReturn(Collections.EMPTY_LIST);
+    expect(users.getAllUsers()).andReturn(Collections.<User>emptyList());
 
     replay(ldapTemplate, ldapServerProperties, users, configuration);
     replay(group1, group2, group3, group4);
@@ -398,14 +398,14 @@ public class AmbariLdapDataPopulatorTest {
     Set<LdapGroupDto> externalGroups = createSet(externalGroup3, externalGroup4);
     for (LdapGroupDto externalGroup : externalGroups) {
       populator.refreshGroupMembers(eq(batchInfo), eq(externalGroup),
-        anyObject(Map.class), anyObject(Map.class), anyObject(Set.class), anyBoolean());
+        EasyMock.<Map<String, User>>anyObject(), EasyMock.<Map<String, Group>>anyObject(), EasyMock.<Set<String>>anyObject(), anyBoolean());
       expectLastCall();
     }
     populator.refreshGroupMembers(eq(batchInfo), eq(externalGroup1),
-      anyObject(Map.class), anyObject(Map.class), anyObject(Set.class), anyBoolean());
+      EasyMock.<Map<String, User>>anyObject(), EasyMock.<Map<String, Group>>anyObject(), EasyMock.<Set<String>>anyObject(), anyBoolean());
     expectLastCall();
-    populator.refreshGroupMembers(eq(batchInfo), eq(externalGroup2), anyObject(Map.class),
-      anyObject(Map.class), anyObject(Set.class), anyBoolean());
+    populator.refreshGroupMembers(eq(batchInfo), eq(externalGroup2), EasyMock.<Map<String, User>>anyObject(),
+      EasyMock.<Map<String, Group>>anyObject(), EasyMock.<Set<String>>anyObject(), anyBoolean());
     expectLastCall();
     expect(populator.getLdapGroups("x*")).andReturn(externalGroups);
     expect(populator.getLdapGroups("group1")).andReturn(Collections.singleton(externalGroup1));
@@ -458,7 +458,7 @@ public class AmbariLdapDataPopulatorTest {
     LdapTemplate ldapTemplate = createNiceMock(LdapTemplate.class);
     LdapServerProperties ldapServerProperties = createNiceMock(LdapServerProperties.class);
     expect(users.getAllGroups()).andReturn(groupList);
-    expect(users.getAllUsers()).andReturn(Collections.EMPTY_LIST);
+    expect(users.getAllUsers()).andReturn(Collections.<User>emptyList());
 
     replay(ldapTemplate, ldapServerProperties, users, configuration);
     replay(group1, group2, group3, group4);
@@ -483,12 +483,12 @@ public class AmbariLdapDataPopulatorTest {
     LdapBatchDto batchInfo = new LdapBatchDto();
     Set<LdapGroupDto> externalGroups = createSet(externalGroup3, externalGroup4);
     for (LdapGroupDto externalGroup : externalGroups) {
-      populator.refreshGroupMembers(eq(batchInfo), eq(externalGroup), anyObject(Map.class), anyObject(Map.class),
-        anyObject(Set.class), anyBoolean());
+      populator.refreshGroupMembers(eq(batchInfo), eq(externalGroup), EasyMock.<Map<String, User>>anyObject(), EasyMock.<Map<String, Group>>anyObject(),
+        EasyMock.<Set<String>>anyObject(), anyBoolean());
       expectLastCall();
     }
-    populator.refreshGroupMembers(eq(batchInfo), eq(externalGroup2), anyObject(Map.class),
-      anyObject(Map.class), anyObject(Set.class), anyBoolean());
+    populator.refreshGroupMembers(eq(batchInfo), eq(externalGroup2), EasyMock.<Map<String, User>>anyObject(),
+      EasyMock.<Map<String, Group>>anyObject(), EasyMock.<Set<String>>anyObject(), anyBoolean());
     expectLastCall();
     expect(populator.getLdapGroups("x*")).andReturn(externalGroups);
     expect(populator.getLdapGroups("group2")).andReturn(Collections.singleton(externalGroup2));
@@ -535,7 +535,7 @@ public class AmbariLdapDataPopulatorTest {
     LdapTemplate ldapTemplate = createNiceMock(LdapTemplate.class);
     LdapServerProperties ldapServerProperties = createNiceMock(LdapServerProperties.class);
     expect(users.getAllGroups()).andReturn(groupList);
-    expect(users.getAllUsers()).andReturn(Collections.EMPTY_LIST);
+    expect(users.getAllUsers()).andReturn(Collections.<User>emptyList());
 
     replay(ldapTemplate, ldapServerProperties, users, configuration);
     replay(group1, group2, group3, group4);
@@ -559,8 +559,8 @@ public class AmbariLdapDataPopulatorTest {
     LdapBatchDto batchInfo = new LdapBatchDto();
     Set<LdapGroupDto> externalGroups = createSet(externalGroup1, externalGroup2, externalGroup3, externalGroup4);
     for (LdapGroupDto externalGroup : externalGroups) {
-      populator.refreshGroupMembers(eq(batchInfo), eq(externalGroup), anyObject(Map.class),
-        anyObject(Map.class), anyObject(Set.class), anyBoolean());
+      populator.refreshGroupMembers(eq(batchInfo), eq(externalGroup), EasyMock.<Map<String, User>>anyObject(),
+        EasyMock.<Map<String, Group>>anyObject(), EasyMock.<Set<String>>anyObject(), anyBoolean());
       expectLastCall();
     }
     expect(populator.getLdapGroups("group*")).andReturn(externalGroups);
@@ -607,7 +607,7 @@ public class AmbariLdapDataPopulatorTest {
     LdapTemplate ldapTemplate = createNiceMock(LdapTemplate.class);
     LdapServerProperties ldapServerProperties = createNiceMock(LdapServerProperties.class);
     expect(users.getAllGroups()).andReturn(groupList);
-    expect(users.getAllUsers()).andReturn(Collections.EMPTY_LIST);
+    expect(users.getAllUsers()).andReturn(Collections.<User>emptyList());
 
     replay(ldapTemplate, ldapServerProperties, users, configuration);
     replay(group1, group2, group3, group4);
@@ -631,7 +631,7 @@ public class AmbariLdapDataPopulatorTest {
     LdapBatchDto batchInfo = new LdapBatchDto();
     Set<LdapGroupDto> externalGroups = createSet(externalGroup3, externalGroup4);
     expect(populator.getLdapGroups("x*")).andReturn(externalGroups);
-    expect(populator.getLdapGroups("group1")).andReturn(Collections.EMPTY_SET);
+    expect(populator.getLdapGroups("group1")).andReturn(Collections.<LdapGroupDto>emptySet());
     expect(populator.getLdapGroups("group2")).andReturn(Collections.singleton(externalGroup2));
     replay(populator);
 
@@ -667,7 +667,7 @@ public class AmbariLdapDataPopulatorTest {
     LdapTemplate ldapTemplate = createNiceMock(LdapTemplate.class);
     LdapServerProperties ldapServerProperties = createNiceMock(LdapServerProperties.class);
     expect(users.getAllGroups()).andReturn(groupList);
-    expect(users.getAllUsers()).andReturn(Collections.EMPTY_LIST);
+    expect(users.getAllUsers()).andReturn(Collections.<User>emptyList());
 
     replay(ldapTemplate, ldapServerProperties, users, configuration);
     replay(group1, group2, group3, group4, group5);
@@ -690,8 +690,8 @@ public class AmbariLdapDataPopulatorTest {
     LdapBatchDto batchInfo = new LdapBatchDto();
     Set<LdapGroupDto> externalGroups = createSet(externalGroup1, externalGroup2, externalGroup3, externalGroup4);
     for (LdapGroupDto externalGroup : externalGroups) {
-      populator.refreshGroupMembers(eq(batchInfo), eq(externalGroup), anyObject(Map.class),
-        anyObject(Map.class), anyObject(Set.class), anyBoolean());
+      populator.refreshGroupMembers(eq(batchInfo), eq(externalGroup), EasyMock.<Map<String, User>>anyObject(),
+        EasyMock.<Map<String, Group>>anyObject(), EasyMock.<Set<String>>anyObject(), anyBoolean());
       expectLastCall();
     }
 
@@ -734,7 +734,7 @@ public class AmbariLdapDataPopulatorTest {
     LdapTemplate ldapTemplate = createNiceMock(LdapTemplate.class);
     LdapServerProperties ldapServerProperties = createNiceMock(LdapServerProperties.class);
     expect(users.getAllGroups()).andReturn(Arrays.asList(group1, group2));
-    expect(users.getAllUsers()).andReturn(Collections.EMPTY_LIST);
+    expect(users.getAllUsers()).andReturn(Collections.<User>emptyList());
 
     replay(ldapTemplate, ldapServerProperties, users, configuration);
     replay(group1, group2);
@@ -752,8 +752,8 @@ public class AmbariLdapDataPopulatorTest {
     LdapBatchDto batchInfo = new LdapBatchDto();
     Set<LdapGroupDto> externalGroups = createSet(externalGroup1, externalGroup2);
     for (LdapGroupDto externalGroup : externalGroups) {
-      populator.refreshGroupMembers(eq(batchInfo), eq(externalGroup), anyObject(Map.class),
-        anyObject(Map.class), anyObject(Set.class), anyBoolean());
+      populator.refreshGroupMembers(eq(batchInfo), eq(externalGroup), EasyMock.<Map<String, User>>anyObject(),
+        EasyMock.<Map<String, Group>>anyObject(), EasyMock.<Set<String>>anyObject(), anyBoolean());
       expectLastCall();
     }
     expect(populator.getExternalLdapGroupInfo()).andReturn(externalGroups);
@@ -801,7 +801,7 @@ public class AmbariLdapDataPopulatorTest {
     LdapTemplate ldapTemplate = createNiceMock(LdapTemplate.class);
     LdapServerProperties ldapServerProperties = createNiceMock(LdapServerProperties.class);
     expect(users.getAllGroups()).andReturn(groupList);
-    expect(users.getAllUsers()).andReturn(Collections.EMPTY_LIST);
+    expect(users.getAllUsers()).andReturn(Collections.<User>emptyList());
 
     replay(ldapTemplate, ldapServerProperties, users, configuration);
     replay(group1, group2, group3, group4);
@@ -817,8 +817,8 @@ public class AmbariLdapDataPopulatorTest {
     LdapBatchDto batchInfo = new LdapBatchDto();
     Set<LdapGroupDto> externalGroups = createSet(externalGroup1);
     for (LdapGroupDto externalGroup : externalGroups) {
-      populator.refreshGroupMembers(eq(batchInfo), eq(externalGroup), anyObject(Map.class),
-        anyObject(Map.class), anyObject(Set.class), anyBoolean());
+      populator.refreshGroupMembers(eq(batchInfo), eq(externalGroup), EasyMock.<Map<String, User>>anyObject(),
+        EasyMock.<Map<String, Group>>anyObject(), EasyMock.<Set<String>>anyObject(), anyBoolean());
       expectLastCall();
     }
     expect(populator.getExternalLdapGroupInfo()).andReturn(externalGroups);
@@ -863,7 +863,7 @@ public class AmbariLdapDataPopulatorTest {
     LdapTemplate ldapTemplate = createNiceMock(LdapTemplate.class);
     LdapServerProperties ldapServerProperties = createNiceMock(LdapServerProperties.class);
     expect(users.getAllGroups()).andReturn(groupList);
-    expect(users.getAllUsers()).andReturn(Collections.EMPTY_LIST);
+    expect(users.getAllUsers()).andReturn(Collections.<User>emptyList());
 
     replay(ldapTemplate, ldapServerProperties, users, configuration);
     replay(group1, group2, group3);
@@ -881,8 +881,8 @@ public class AmbariLdapDataPopulatorTest {
     LdapBatchDto batchInfo = new LdapBatchDto();
     Set<LdapGroupDto> externalGroups = createSet(externalGroup1, externalGroup2);
     for (LdapGroupDto externalGroup : externalGroups) {
-      populator.refreshGroupMembers(eq(batchInfo), eq(externalGroup), anyObject(Map.class),
-        anyObject(Map.class), anyObject(Set.class), anyBoolean());
+      populator.refreshGroupMembers(eq(batchInfo), eq(externalGroup), EasyMock.<Map<String, User>>anyObject(),
+        EasyMock.<Map<String, Group>>anyObject(), EasyMock.<Set<String>>anyObject(), anyBoolean());
       expectLastCall();
     }
     expect(populator.getExternalLdapGroupInfo()).andReturn(externalGroups);
@@ -1115,7 +1115,7 @@ public class AmbariLdapDataPopulatorTest {
         .createNiceMock();
 
 
-    expect(populator.getExternalLdapUserInfo()).andReturn(Collections.EMPTY_SET);
+    expect(populator.getExternalLdapUserInfo()).andReturn(Collections.<LdapUserDto>emptySet());
     replay(populator);
 
     populator.setLdapTemplate(ldapTemplate);
@@ -1226,7 +1226,7 @@ public class AmbariLdapDataPopulatorTest {
         .withConstructor(configuration, users)
         .createNiceMock();
 
-    expect(populator.getLdapUsers("synced_user1")).andReturn(Collections.EMPTY_SET);
+    expect(populator.getLdapUsers("synced_user1")).andReturn(Collections.<LdapUserDto>emptySet());
     expect(populator.getLdapUsers("synced_user2")).andReturn(Collections.singleton(createNiceMock(LdapUserDto.class)));
     replay(populator);
 
@@ -1468,7 +1468,7 @@ public class AmbariLdapDataPopulatorTest {
 
     expect(populator.getLdapUsers("xuser*")).andReturn(createSet(externalUser3, externalUser4));
     expect(populator.getLdapUsers("user1")).andReturn(Collections.singleton(externalUser1));
-    expect(populator.getLdapUsers("user2")).andReturn(Collections.EMPTY_SET);
+    expect(populator.getLdapUsers("user2")).andReturn(Collections.<LdapUserDto>emptySet());
     replay(populator);
 
     populator.setLdapTemplate(ldapTemplate);
@@ -1608,7 +1608,7 @@ public class AmbariLdapDataPopulatorTest {
     expect(users.getAllUsers()).andReturn(new ArrayList<User>(allUsers));
 
     final List<User> removedUsers = new ArrayList<User>();
-    final Capture<User> userCapture = new Capture<User>();
+    final Capture<User> userCapture = EasyMock.newCapture();
     users.removeUser(capture(userCapture));
     expectLastCall().andAnswer(new IAnswer<Void>() {
       @Override
@@ -1643,8 +1643,8 @@ public class AmbariLdapDataPopulatorTest {
     Users users = createNiceMock(Users.class);
     LdapTemplate ldapTemplate = createNiceMock(LdapTemplate.class);
     LdapServerProperties ldapServerProperties = createNiceMock(LdapServerProperties.class);
-    Capture<ContextMapper> contextMapperCapture = new Capture<ContextMapper>();
-    Capture<SearchControls> searchControlsCapture = new Capture<SearchControls>();
+    Capture<ContextMapper> contextMapperCapture = EasyMock.newCapture();
+    Capture<SearchControls> searchControlsCapture = EasyMock.newCapture();
     PagedResultsDirContextProcessor processor = createNiceMock(PagedResultsDirContextProcessor.class);
     PagedResultsCookie cookie = createNiceMock(PagedResultsCookie.class);
     LdapUserDto dto = new LdapUserDto();
@@ -1682,8 +1682,8 @@ public class AmbariLdapDataPopulatorTest {
     Users users = createNiceMock(Users.class);
     LdapTemplate ldapTemplate = createNiceMock(LdapTemplate.class);
     LdapServerProperties ldapServerProperties = createNiceMock(LdapServerProperties.class);
-    Capture<ContextMapper> contextMapperCapture = new Capture<ContextMapper>();
-    Capture<SearchControls> searchControlsCapture = new Capture<SearchControls>();
+    Capture<ContextMapper> contextMapperCapture = EasyMock.newCapture();
+    Capture<SearchControls> searchControlsCapture = EasyMock.newCapture();
     PagedResultsDirContextProcessor processor = createNiceMock(PagedResultsDirContextProcessor.class);
     PagedResultsCookie cookie = createNiceMock(PagedResultsCookie.class);
     LdapUserDto dto = new LdapUserDto();

http://git-wip-us.apache.org/repos/asf/ambari/blob/edce0b11/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/MITKerberosOperationHandlerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/MITKerberosOperationHandlerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/MITKerberosOperationHandlerTest.java
index 17b9535..14e06aa 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/MITKerberosOperationHandlerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/MITKerberosOperationHandlerTest.java
@@ -135,7 +135,7 @@ public class MITKerberosOperationHandlerTest extends KerberosOperationHandlerTes
         .addMockedMethod(methodExecuteCommand)
         .createNiceMock();
     injector.injectMembers(handler);
-    expect(handler.executeCommand(anyObject(String[].class), anyObject(Map.class), anyObject(MITKerberosOperationHandler.InteractivePasswordHandler.class)))
+    expect(handler.executeCommand(anyObject(String[].class), EasyMock.<Map<String, String>>anyObject(), anyObject(MITKerberosOperationHandler.InteractivePasswordHandler.class)))
         .andAnswer(new IAnswer<ShellCommandUtil.Result>() {
           @Override
           public ShellCommandUtil.Result answer() throws Throwable {
@@ -198,7 +198,7 @@ public class MITKerberosOperationHandlerTest extends KerberosOperationHandlerTes
   public void testCreatePrincipalPrincipalAlreadyNotExists() throws Exception {
     MITKerberosOperationHandler handler = createMock();
 
-    expect(handler.executeCommand(anyObject(String[].class), anyObject(Map.class), anyObject(MITKerberosOperationHandler.InteractivePasswordHandler.class)))
+    expect(handler.executeCommand(anyObject(String[].class), EasyMock.<Map<String, String>>anyObject(), anyObject(MITKerberosOperationHandler.InteractivePasswordHandler.class)))
         .andAnswer(new IAnswer<ShellCommandUtil.Result>() {
           @Override
           public ShellCommandUtil.Result answer() throws Throwable {
@@ -263,7 +263,7 @@ public class MITKerberosOperationHandlerTest extends KerberosOperationHandlerTes
   public void testTestAdministratorCredentialsIncorrectAdminPassword() throws Exception {
     MITKerberosOperationHandler handler = createMock();
 
-    expect(handler.executeCommand(anyObject(String[].class), anyObject(Map.class), anyObject(MITKerberosOperationHandler.InteractivePasswordHandler.class)))
+    expect(handler.executeCommand(anyObject(String[].class), EasyMock.<Map<String, String>>anyObject(), anyObject(MITKerberosOperationHandler.InteractivePasswordHandler.class)))
         .andAnswer(new IAnswer<ShellCommandUtil.Result>() {
           @Override
           public ShellCommandUtil.Result answer() throws Throwable {
@@ -294,7 +294,7 @@ public class MITKerberosOperationHandlerTest extends KerberosOperationHandlerTes
   public void testTestAdministratorCredentialsIncorrectAdminPrincipal() throws Exception {
     MITKerberosOperationHandler handler = createMock();
 
-    expect(handler.executeCommand(anyObject(String[].class), anyObject(Map.class), anyObject(MITKerberosOperationHandler.InteractivePasswordHandler.class)))
+    expect(handler.executeCommand(anyObject(String[].class), EasyMock.<Map<String, String>>anyObject(), anyObject(MITKerberosOperationHandler.InteractivePasswordHandler.class)))
         .andAnswer(new IAnswer<ShellCommandUtil.Result>() {
           @Override
           public ShellCommandUtil.Result answer() throws Throwable {
@@ -325,7 +325,7 @@ public class MITKerberosOperationHandlerTest extends KerberosOperationHandlerTes
   public void testTestAdministratorCredentialsInvalidRealm() throws Exception {
     MITKerberosOperationHandler handler = createMock();
 
-    expect(handler.executeCommand(anyObject(String[].class), anyObject(Map.class), anyObject(MITKerberosOperationHandler.InteractivePasswordHandler.class)))
+    expect(handler.executeCommand(anyObject(String[].class), EasyMock.<Map<String, String>>anyObject(), anyObject(MITKerberosOperationHandler.InteractivePasswordHandler.class)))
         .andAnswer(new IAnswer<ShellCommandUtil.Result>() {
           @Override
           public ShellCommandUtil.Result answer() throws Throwable {
@@ -356,7 +356,7 @@ public class MITKerberosOperationHandlerTest extends KerberosOperationHandlerTes
   public void testTestAdministratorCredentialsInvalidRealm2() throws Exception {
     MITKerberosOperationHandler handler = createMock();
 
-    expect(handler.executeCommand(anyObject(String[].class), anyObject(Map.class), anyObject(MITKerberosOperationHandler.InteractivePasswordHandler.class)))
+    expect(handler.executeCommand(anyObject(String[].class), EasyMock.<Map<String, String>>anyObject(), anyObject(MITKerberosOperationHandler.InteractivePasswordHandler.class)))
         .andAnswer(new IAnswer<ShellCommandUtil.Result>() {
           @Override
           public ShellCommandUtil.Result answer() throws Throwable {
@@ -387,7 +387,7 @@ public class MITKerberosOperationHandlerTest extends KerberosOperationHandlerTes
   public void testTestAdministratorCredentialsKDCConnectionException() throws Exception {
     MITKerberosOperationHandler handler = createMock();
 
-    expect(handler.executeCommand(anyObject(String[].class), anyObject(Map.class), anyObject(MITKerberosOperationHandler.InteractivePasswordHandler.class)))
+    expect(handler.executeCommand(anyObject(String[].class), EasyMock.<Map<String, String>>anyObject(), anyObject(MITKerberosOperationHandler.InteractivePasswordHandler.class)))
         .andAnswer(new IAnswer<ShellCommandUtil.Result>() {
           @Override
           public ShellCommandUtil.Result answer() throws Throwable {
@@ -418,7 +418,7 @@ public class MITKerberosOperationHandlerTest extends KerberosOperationHandlerTes
   public void testTestAdministratorCredentialsKDCConnectionException2() throws Exception {
     MITKerberosOperationHandler handler = createMock();
 
-    expect(handler.executeCommand(anyObject(String[].class), anyObject(Map.class), anyObject(MITKerberosOperationHandler.InteractivePasswordHandler.class)))
+    expect(handler.executeCommand(anyObject(String[].class), EasyMock.<Map<String, String>>anyObject(), anyObject(MITKerberosOperationHandler.InteractivePasswordHandler.class)))
         .andAnswer(new IAnswer<ShellCommandUtil.Result>() {
           @Override
           public ShellCommandUtil.Result answer() throws Throwable {
@@ -449,7 +449,7 @@ public class MITKerberosOperationHandlerTest extends KerberosOperationHandlerTes
   public void testTestAdministratorCredentialsNotFound() throws Exception {
     MITKerberosOperationHandler handler = createMock();
 
-    expect(handler.executeCommand(anyObject(String[].class), anyObject(Map.class), anyObject(MITKerberosOperationHandler.InteractivePasswordHandler.class)))
+    expect(handler.executeCommand(anyObject(String[].class), EasyMock.<Map<String, String>>anyObject(), anyObject(MITKerberosOperationHandler.InteractivePasswordHandler.class)))
         .andAnswer(new IAnswer<ShellCommandUtil.Result>() {
           @Override
           public ShellCommandUtil.Result answer() throws Throwable {
@@ -480,7 +480,7 @@ public class MITKerberosOperationHandlerTest extends KerberosOperationHandlerTes
   public void testTestAdministratorCredentialsSuccess() throws Exception {
     MITKerberosOperationHandler handler = createMock();
 
-    expect(handler.executeCommand(anyObject(String[].class), anyObject(Map.class), anyObject(MITKerberosOperationHandler.InteractivePasswordHandler.class)))
+    expect(handler.executeCommand(anyObject(String[].class), EasyMock.<Map<String, String>>anyObject(), anyObject(MITKerberosOperationHandler.InteractivePasswordHandler.class)))
         .andAnswer(new IAnswer<ShellCommandUtil.Result>() {
           @Override
           public ShellCommandUtil.Result answer() throws Throwable {

http://git-wip-us.apache.org/repos/asf/ambari/blob/edce0b11/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
index 1a38d87..fc9c857 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/UpdateKerberosConfigsServerActionTest.java
@@ -34,6 +34,7 @@ import org.apache.ambari.server.state.Cluster;
 import org.apache.ambari.server.state.Clusters;
 import org.apache.ambari.server.state.ConfigHelper;
 import org.apache.ambari.server.state.stack.OsFamily;
+import org.easymock.EasyMock;
 import org.easymock.EasyMockSupport;
 import org.junit.Before;
 import org.junit.Rule;
@@ -100,7 +101,7 @@ public class UpdateKerberosConfigsServerActionTest extends EasyMockSupport{
 
     ConfigHelper configHelper = injector.getInstance(ConfigHelper.class);
     configHelper.updateConfigType(anyObject(Cluster.class), anyObject(AmbariManagementController.class),
-        anyObject(String.class), anyObject(Map.class), anyObject(Collection.class), anyObject(String.class), anyObject(String.class));
+        anyObject(String.class), EasyMock.<Map<String, String>>anyObject(), EasyMock.<Collection<String>>anyObject(), anyObject(String.class), anyObject(String.class));
     expectLastCall().atLeastOnce();
 
     replayAll();

http://git-wip-us.apache.org/repos/asf/ambari/blob/edce0b11/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/HiveZKQuorumConfigActionTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/HiveZKQuorumConfigActionTest.java b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/HiveZKQuorumConfigActionTest.java
index cd5eb9d..fd61c57 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/HiveZKQuorumConfigActionTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/HiveZKQuorumConfigActionTest.java
@@ -88,7 +88,7 @@ public class HiveZKQuorumConfigActionTest {
 
     EasyMock.expect(m_hiveSiteConfig.getProperties()).andReturn(hiveSiteProperties).atLeastOnce();
 
-    m_hiveSiteConfig.setProperties(EasyMock.anyObject(Map.class));
+    m_hiveSiteConfig.setProperties(EasyMock.<Map<String, String>>anyObject());
     EasyMock.expectLastCall().once();
 
     m_hiveSiteConfig.save();

http://git-wip-us.apache.org/repos/asf/ambari/blob/edce0b11/ambari-server/src/test/java/org/apache/ambari/server/serveraction/users/PostUserCreationHookServerActionTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/users/PostUserCreationHookServerActionTest.java b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/users/PostUserCreationHookServerActionTest.java
index f5cdf48..a4d50ef 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/users/PostUserCreationHookServerActionTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/users/PostUserCreationHookServerActionTest.java
@@ -128,7 +128,7 @@ public class PostUserCreationHookServerActionTest extends EasyMockSupport {
     customScriptServerAction.setExecutionCommand(executionCommand);
 
     EasyMock.expect(collectionPersisterServiceFactoryMock.createCsvFilePersisterService(EasyMock.anyString())).andReturn(collectionPersisterService);
-    EasyMock.expect(collectionPersisterService.persistMap(EasyMock.anyObject(Map.class))).andReturn(Boolean.TRUE);
+    EasyMock.expect(collectionPersisterService.persistMap(EasyMock.<Map<String, List<String>>>anyObject())).andReturn(Boolean.TRUE);
 
     replayAll();
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/edce0b11/ambari-server/src/test/java/org/apache/ambari/server/stack/RepoUtilTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/stack/RepoUtilTest.java b/ambari-server/src/test/java/org/apache/ambari/server/stack/RepoUtilTest.java
index 9e18cd0..f7cb524 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/stack/RepoUtilTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/stack/RepoUtilTest.java
@@ -150,7 +150,7 @@ public class RepoUtilTest {
 
   private static ListMultimap<String, RepositoryInfo> serviceRepos(List<String> operatingSystems,
       String repoName, String repoId, String baseUrl) {
-    ArrayListMultimap multimap = ArrayListMultimap.create();
+    ListMultimap<String, RepositoryInfo> multimap = ArrayListMultimap.create();
     for (String os: operatingSystems) {
       RepositoryInfo repoInfo = new RepositoryInfo();
       repoInfo.setOsType(os);

http://git-wip-us.apache.org/repos/asf/ambari/blob/edce0b11/ambari-server/src/test/java/org/apache/ambari/server/stack/StackModuleTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/stack/StackModuleTest.java b/ambari-server/src/test/java/org/apache/ambari/server/stack/StackModuleTest.java
index 4698178..43acb67 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/stack/StackModuleTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/stack/StackModuleTest.java
@@ -131,7 +131,8 @@ public class StackModuleTest {
     assertEquals(removedServices.size(), 0);
   }
 
-  private StackModule createStackModule(String stackName, String stackVersion, Optional<? extends List<RepositoryInfo>> stackRepos,
+  @SafeVarargs
+  private static StackModule createStackModule(String stackName, String stackVersion, Optional<? extends List<RepositoryInfo>> stackRepos,
                                         List<RepositoryInfo>... serviceRepoLists) throws AmbariException {
     StackDirectory sd = mock(StackDirectory.class);
     List<ServiceDirectory> serviceDirectories = Lists.newArrayList();

http://git-wip-us.apache.org/repos/asf/ambari/blob/edce0b11/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java
index daa3abc..6772a68 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java
@@ -78,6 +78,7 @@ import org.apache.ambari.server.orm.entities.HostEntity;
 import org.apache.ambari.server.orm.entities.HostStateEntity;
 import org.apache.ambari.server.orm.entities.HostVersionEntity;
 import org.apache.ambari.server.orm.entities.RepositoryVersionEntity;
+import org.apache.ambari.server.orm.entities.ServiceComponentDesiredStateEntity;
 import org.apache.ambari.server.orm.entities.ServiceDesiredStateEntity;
 import org.apache.ambari.server.orm.entities.StackEntity;
 import org.apache.ambari.server.state.AgentVersion;
@@ -282,7 +283,7 @@ public class ClusterTest {
     hostEntities.add(host2);
 
     clusterEntity.setHostEntities(hostEntities);
-    clusterEntity.setClusterConfigEntities(Collections.EMPTY_LIST);
+    clusterEntity.setClusterConfigEntities(Collections.<ClusterConfigEntity>emptyList());
     //both sides of relation should be set when modifying in runtime
     host1.setClusterEntities(Arrays.asList(clusterEntity));
     host2.setClusterEntities(Arrays.asList(clusterEntity));
@@ -300,7 +301,7 @@ public class ClusterTest {
     clusterServiceEntity.setServiceName("HDFS");
     clusterServiceEntity.setClusterEntity(clusterEntity);
     clusterServiceEntity.setServiceComponentDesiredStateEntities(
-        Collections.EMPTY_LIST);
+        Collections.<ServiceComponentDesiredStateEntity>emptyList());
 
     ServiceDesiredStateEntity stateEntity = mock(ServiceDesiredStateEntity.class);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/edce0b11/ambari-server/src/test/java/org/apache/ambari/server/state/scheduler/BatchRequestJobTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/scheduler/BatchRequestJobTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/scheduler/BatchRequestJobTest.java
index 0d0e03c..2281785 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/scheduler/BatchRequestJobTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/scheduler/BatchRequestJobTest.java
@@ -36,6 +36,7 @@ import java.util.Map;
 import org.apache.ambari.server.actionmanager.HostRoleStatus;
 import org.apache.ambari.server.scheduler.ExecutionScheduleManager;
 import org.easymock.Capture;
+import org.easymock.EasyMock;
 import org.junit.Assert;
 import org.junit.Test;
 import org.quartz.JobDataMap;
@@ -72,9 +73,9 @@ public class BatchRequestJobTest {
     BatchRequestResponse completedResponse = new BatchRequestResponse();
     completedResponse.setStatus(HostRoleStatus.COMPLETED.toString());
 
-    Capture<Long> executionIdCapture = new Capture<Long>();
-    Capture<Long> batchIdCapture = new Capture<Long>();
-    Capture<String> clusterNameCapture = new Capture<String>();
+    Capture<Long> executionIdCapture = EasyMock.newCapture();
+    Capture<Long> batchIdCapture = EasyMock.newCapture();
+    Capture<String> clusterNameCapture = EasyMock.newCapture();
 
 
     expect(scheduleManagerMock.executeBatchRequest(captureLong(executionIdCapture),
@@ -127,7 +128,7 @@ public class BatchRequestJobTest {
     expect(jobDataMap.getWrappedMap()).andReturn(properties);
     expect(jobDataMap.getString((String) anyObject())).andReturn("testJob").anyTimes();
 
-    Capture<Trigger> triggerCapture = new Capture<Trigger>();
+    Capture<Trigger> triggerCapture = EasyMock.newCapture();
     scheduleManagerMock.scheduleJob(capture(triggerCapture));
     expectLastCall().once();
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/edce0b11/ambari-server/src/test/java/org/apache/ambari/server/topology/AmbariContextTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/AmbariContextTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/AmbariContextTest.java
index fac5185..b0c4729 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/AmbariContextTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/AmbariContextTest.java
@@ -121,7 +121,7 @@ public class AmbariContextTest {
   private Configuration group1Configuration = null;
   private static final Collection<String> group1Hosts = Arrays.asList(HOST1, HOST2);
 
-  private Capture<Set<ConfigGroupRequest>> configGroupRequestCapture = new Capture<Set<ConfigGroupRequest>>();
+  private Capture<Set<ConfigGroupRequest>> configGroupRequestCapture = EasyMock.newCapture();
 
   @Before
   public void setUp() throws Exception {
@@ -266,23 +266,23 @@ public class AmbariContextTest {
   @Test
   public void testCreateAmbariResources() throws Exception {
     // expectations
-    Capture<ClusterRequest> clusterRequestCapture = new Capture<ClusterRequest>();
+    Capture<ClusterRequest> clusterRequestCapture = EasyMock.newCapture();
     controller.createCluster(capture(clusterRequestCapture));
     expectLastCall().once();
     expect(cluster.getServices()).andReturn(clusterServices).anyTimes();
 
-    Capture<Set<ServiceRequest>> serviceRequestCapture = new Capture<Set<ServiceRequest>>();
-    Capture<Set<ServiceComponentRequest>> serviceComponentRequestCapture = new Capture<Set<ServiceComponentRequest>>();
+    Capture<Set<ServiceRequest>> serviceRequestCapture = EasyMock.newCapture();
+    Capture<Set<ServiceComponentRequest>> serviceComponentRequestCapture = EasyMock.newCapture();
 
     serviceResourceProvider.createServices(capture(serviceRequestCapture));
     expectLastCall().once();
     componentResourceProvider.createComponents(capture(serviceComponentRequestCapture));
     expectLastCall().once();
 
-    Capture<Request> serviceInstallRequestCapture = new Capture<Request>();
-    Capture<Request> serviceStartRequestCapture = new Capture<Request>();
-    Capture<Predicate> installPredicateCapture = new Capture<Predicate>();
-    Capture<Predicate> startPredicateCapture = new Capture<Predicate>();
+    Capture<Request> serviceInstallRequestCapture = EasyMock.newCapture();
+    Capture<Request> serviceStartRequestCapture = EasyMock.newCapture();
+    Capture<Predicate> installPredicateCapture = EasyMock.newCapture();
+    Capture<Predicate> startPredicateCapture = EasyMock.newCapture();
 
     expect(serviceResourceProvider.updateResources(capture(serviceInstallRequestCapture),
         capture(installPredicateCapture))).andReturn(null).once();

http://git-wip-us.apache.org/repos/asf/ambari/blob/edce0b11/ambari-server/src/test/java/org/apache/ambari/server/topology/AsyncCallableServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/AsyncCallableServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/AsyncCallableServiceTest.java
index 0f795b6..60bb2ba 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/AsyncCallableServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/AsyncCallableServiceTest.java
@@ -88,7 +88,7 @@ public class AsyncCallableServiceTest extends EasyMockSupport {
 
     replayAll();
 
-    asyncCallableService = new AsyncCallableService(taskMock, timeout, delay, executorServiceMock);
+    asyncCallableService = new AsyncCallableService<>(taskMock, timeout, delay, executorServiceMock);
 
     // WHEN
     Boolean serviceResult = asyncCallableService.call();
@@ -111,7 +111,7 @@ public class AsyncCallableServiceTest extends EasyMockSupport {
       }
     };
 
-    asyncCallableService = new AsyncCallableService(hangingTask, timeout, delay, Executors.newScheduledThreadPool(2));
+    asyncCallableService = new AsyncCallableService<>(hangingTask, timeout, delay, Executors.newScheduledThreadPool(2));
 
     // WHEN
     Boolean serviceResult = asyncCallableService.call();
@@ -128,7 +128,7 @@ public class AsyncCallableServiceTest extends EasyMockSupport {
     expect(taskMock.call()).andReturn(Boolean.TRUE).times(1);
 
     replayAll();
-    asyncCallableService = new AsyncCallableService(taskMock, timeout, delay, Executors.newScheduledThreadPool(2));
+    asyncCallableService = new AsyncCallableService<>(taskMock, timeout, delay, Executors.newScheduledThreadPool(2));
 
     // WHEN
     Boolean serviceResult = asyncCallableService.call();
@@ -146,7 +146,7 @@ public class AsyncCallableServiceTest extends EasyMockSupport {
     // the task to be throws exception
     expect(taskMock.call()).andThrow(new IllegalStateException("****************** TESTING ****************")).times(2, 3);
     replayAll();
-    asyncCallableService = new AsyncCallableService(taskMock, timeout, delay, Executors.newScheduledThreadPool(2));
+    asyncCallableService = new AsyncCallableService<>(taskMock, timeout, delay, Executors.newScheduledThreadPool(2));
 
     // WHEN
     Boolean serviceResult = asyncCallableService.call();
@@ -170,7 +170,7 @@ public class AsyncCallableServiceTest extends EasyMockSupport {
       }
     };
 
-    asyncCallableService = new AsyncCallableService(hangingTask, timeout, delay, Executors.newScheduledThreadPool(2));
+    asyncCallableService = new AsyncCallableService<>(hangingTask, timeout, delay, Executors.newScheduledThreadPool(2));
 
     // WHEN
     Boolean serviceResult = asyncCallableService.call();

http://git-wip-us.apache.org/repos/asf/ambari/blob/edce0b11/ambari-server/src/test/java/org/apache/ambari/server/topology/BlueprintImplTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/BlueprintImplTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/BlueprintImplTest.java
index 0efa94b..1ffd8f7 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/BlueprintImplTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/BlueprintImplTest.java
@@ -37,6 +37,7 @@ import java.util.Set;
 import org.apache.ambari.server.controller.internal.Stack;
 import org.apache.ambari.server.orm.entities.BlueprintEntity;
 import org.apache.ambari.server.state.SecurityType;
+import org.easymock.EasyMock;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -408,10 +409,10 @@ public class BlueprintImplTest {
 //    iter.remove();
 //
 //    AmbariManagementController managementController = createMock(AmbariManagementController.class);
-//    Capture<Set<StackServiceRequest>> stackServiceRequestCapture = new Capture<Set<StackServiceRequest>>();
-//    Capture<Set<StackServiceComponentRequest>> serviceComponentRequestCapture = new Capture<Set<StackServiceComponentRequest>>();
-//    Capture<StackConfigurationRequest> stackConfigurationRequestCapture = new Capture<StackConfigurationRequest>();
-//    Capture<StackLevelConfigurationRequest> stackLevelConfigurationRequestCapture = new Capture<StackLevelConfigurationRequest>();
+//    Capture<Set<StackServiceRequest>> stackServiceRequestCapture = EasyMock.newCapture();
+//    Capture<Set<StackServiceComponentRequest>> serviceComponentRequestCapture = EasyMock.newCapture();
+//    Capture<StackConfigurationRequest> stackConfigurationRequestCapture = EasyMock.newCapture();
+//    Capture<StackLevelConfigurationRequest> stackLevelConfigurationRequestCapture = EasyMock.newCapture();
 //    Request request = createMock(Request.class);
 //    StackServiceResponse stackServiceResponse = createMock(StackServiceResponse.class);
 //    StackServiceComponentResponse stackServiceComponentResponse = createNiceMock(StackServiceComponentResponse.class);
@@ -433,7 +434,7 @@ public class BlueprintImplTest {
 //    serviceComponents.add(component1);
 //    serviceComponents.add(component2);
 //
-//    Capture<BlueprintEntity> entityCapture = new Capture<BlueprintEntity>();
+//    Capture<BlueprintEntity> entityCapture = EasyMock.newCapture();
 //
 //    // set expectations
 //    expect(blueprintFactory.createBlueprint(setProperties.iterator().next())).andReturn(blueprint).once();
@@ -516,10 +517,10 @@ public class BlueprintImplTest {
 //    setConfigurationProperties(setProperties);
 //
 //    AmbariManagementController managementController = createMock(AmbariManagementController.class);
-//    Capture<Set<StackServiceRequest>> stackServiceRequestCapture = new Capture<Set<StackServiceRequest>>();
-//    Capture<Set<StackServiceComponentRequest>> serviceComponentRequestCapture = new Capture<Set<StackServiceComponentRequest>>();
-//    Capture<StackConfigurationRequest> stackConfigurationRequestCapture = new Capture<StackConfigurationRequest>();
-//    Capture<StackLevelConfigurationRequest> stackLevelConfigurationRequestCapture = new Capture<StackLevelConfigurationRequest>();
+//    Capture<Set<StackServiceRequest>> stackServiceRequestCapture = EasyMock.newCapture();
+//    Capture<Set<StackServiceComponentRequest>> serviceComponentRequestCapture = EasyMock.newCapture();
+//    Capture<StackConfigurationRequest> stackConfigurationRequestCapture = EasyMock.newCapture();
+//    Capture<StackLevelConfigurationRequest> stackLevelConfigurationRequestCapture = EasyMock.newCapture();
 //    Request request = createMock(Request.class);
 //    StackServiceResponse stackServiceResponse = createMock(StackServiceResponse.class);
 //    StackServiceComponentResponse stackServiceComponentResponse = createNiceMock(StackServiceComponentResponse.class);
@@ -548,7 +549,7 @@ public class BlueprintImplTest {
 //    serviceComponents.add(component1);
 //    serviceComponents.add(component2);
 //
-//    Capture<BlueprintEntity> entityCapture = new Capture<BlueprintEntity>();
+//    Capture<BlueprintEntity> entityCapture = EasyMock.newCapture();
 //
 //    // set expectations
 //    expect(managementController.getStackServices(capture(stackServiceRequestCapture))).andReturn(
@@ -634,10 +635,10 @@ public class BlueprintImplTest {
 //    iter.remove();
 //
 //    AmbariManagementController managementController = createMock(AmbariManagementController.class);
-//    Capture<Set<StackServiceRequest>> stackServiceRequestCapture = new Capture<Set<StackServiceRequest>>();
-//    Capture<Set<StackServiceComponentRequest>> serviceComponentRequestCapture = new Capture<Set<StackServiceComponentRequest>>();
-//    Capture<StackConfigurationRequest> stackConfigurationRequestCapture = new Capture<StackConfigurationRequest>();
-//    Capture<StackLevelConfigurationRequest> stackLevelConfigurationRequestCapture = new Capture<StackLevelConfigurationRequest>();
+//    Capture<Set<StackServiceRequest>> stackServiceRequestCapture = EasyMock.newCapture();
+//    Capture<Set<StackServiceComponentRequest>> serviceComponentRequestCapture = EasyMock.newCapture();
+//    Capture<StackConfigurationRequest> stackConfigurationRequestCapture = EasyMock.newCapture();
+//    Capture<StackLevelConfigurationRequest> stackLevelConfigurationRequestCapture = EasyMock.newCapture();
 //    Request request = createMock(Request.class);
 //    StackServiceResponse stackServiceResponse = createMock(StackServiceResponse.class);
 //    StackServiceComponentResponse stackServiceComponentResponse = createNiceMock(StackServiceComponentResponse.class);
@@ -667,7 +668,7 @@ public class BlueprintImplTest {
 //    serviceComponents.add(component1);
 //    serviceComponents.add(component2);
 //
-//    Capture<BlueprintEntity> entityCapture = new Capture<BlueprintEntity>();
+//    Capture<BlueprintEntity> entityCapture = EasyMock.newCapture();
 //
 //    // set expectations
 //    expect(managementController.getStackServices(capture(stackServiceRequestCapture))).andReturn(
@@ -752,10 +753,10 @@ public class BlueprintImplTest {
 //    iter.remove();
 //
 //    AmbariManagementController managementController = createMock(AmbariManagementController.class);
-//    Capture<Set<StackServiceRequest>> stackServiceRequestCapture = new Capture<Set<StackServiceRequest>>();
-//    Capture<Set<StackServiceComponentRequest>> serviceComponentRequestCapture = new Capture<Set<StackServiceComponentRequest>>();
-//    Capture<StackConfigurationRequest> stackConfigurationRequestCapture = new Capture<StackConfigurationRequest>();
-//    Capture<StackLevelConfigurationRequest> stackLevelConfigurationRequestCapture = new Capture<StackLevelConfigurationRequest>();
+//    Capture<Set<StackServiceRequest>> stackServiceRequestCapture = EasyMock.newCapture();
+//    Capture<Set<StackServiceComponentRequest>> serviceComponentRequestCapture = EasyMock.newCapture();
+//    Capture<StackConfigurationRequest> stackConfigurationRequestCapture = EasyMock.newCapture();
+//    Capture<StackLevelConfigurationRequest> stackLevelConfigurationRequestCapture = EasyMock.newCapture();
 //    Request request = createMock(Request.class);
 //    StackServiceResponse stackServiceResponse = createMock(StackServiceResponse.class);
 //    StackServiceComponentResponse stackServiceComponentResponse = createNiceMock(StackServiceComponentResponse.class);
@@ -849,7 +850,7 @@ public class BlueprintImplTest {
 //  {
 //    Request request = createMock(Request.class);
 //    AmbariManagementController managementController = createMock(AmbariManagementController.class);
-//    Capture<Set<StackServiceRequest>> stackServiceRequestCapture = new Capture<Set<StackServiceRequest>>();
+//    Capture<Set<StackServiceRequest>> stackServiceRequestCapture = EasyMock.newCapture();
 //
 //    Map<String, ServiceInfo> services = new HashMap<String, ServiceInfo>();
 //    ServiceInfo service = new ServiceInfo();
@@ -870,7 +871,7 @@ public class BlueprintImplTest {
 //        BlueprintResourceProvider.HOST_GROUP_PROPERTY_ID)).iterator().next().get("components")).
 //        iterator().next().put("name", "AMBARI_SERVER");
 //
-//    Capture<BlueprintEntity> entityCapture = new Capture<BlueprintEntity>();
+//    Capture<BlueprintEntity> entityCapture = EasyMock.newCapture();
 //
 //    // set expectations
 //    expect(managementController.getStackServices(capture(stackServiceRequestCapture))).andReturn(

http://git-wip-us.apache.org/repos/asf/ambari/blob/edce0b11/ambari-server/src/test/java/org/apache/ambari/server/topology/BlueprintValidatorImplTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/BlueprintValidatorImplTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/BlueprintValidatorImplTest.java
index 4ca5b5f..08b9889 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/BlueprintValidatorImplTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/BlueprintValidatorImplTest.java
@@ -228,7 +228,8 @@ public class BlueprintValidatorImplTest {
 
     services.addAll(Arrays.asList("HIVE"));
 
-    expect(group1.getConfiguration()).andReturn(new Configuration(new HashMap(), new HashMap())).anyTimes();
+    Configuration config = new Configuration(new HashMap<String, Map<String, String>>(), new HashMap<String, Map<String, Map<String, String>>>());
+    expect(group1.getConfiguration()).andReturn(config).anyTimes();
 
     expect(stack.getComponents("HIVE")).andReturn(Collections.singleton("HIVE_METASTORE")).anyTimes();
     expect(stack.getVersion()).andReturn("2.2").once();
@@ -251,7 +252,8 @@ public class BlueprintValidatorImplTest {
 
     services.addAll(Arrays.asList("OOZIE"));
 
-    expect(group1.getConfiguration()).andReturn(new Configuration(new HashMap(), new HashMap())).anyTimes();
+    Configuration config = new Configuration(new HashMap<String, Map<String, String>>(), new HashMap<String, Map<String, Map<String, String>>>());
+    expect(group1.getConfiguration()).andReturn(config).anyTimes();
 
     expect(stack.getComponents("OOZIE")).andReturn(Collections.singleton("OOZIE_SERVER")).anyTimes();
     expect(stack.getVersion()).andReturn("2.2").once();
@@ -398,8 +400,8 @@ public class BlueprintValidatorImplTest {
     expect(dependency2.getName()).andReturn("dependency-2").anyTimes();
     expect(dependency2.hasDependencyConditions()).andReturn(false).anyTimes();
 
-    expect(dependencyConditionInfo1.isResolved(EasyMock.anyObject(Map.class))).andReturn(true).anyTimes();
-    expect(dependencyConditionInfo2.isResolved(EasyMock.anyObject(Map.class))).andReturn(false).anyTimes();
+    expect(dependencyConditionInfo1.isResolved(EasyMock.<Map<String, Map<String, String>>>anyObject())).andReturn(true).anyTimes();
+    expect(dependencyConditionInfo2.isResolved(EasyMock.<Map<String, Map<String, String>>>anyObject())).andReturn(false).anyTimes();
 
 
     expect(dependencyComponentInfo.isClient()).andReturn(false).anyTimes();

http://git-wip-us.apache.org/repos/asf/ambari/blob/edce0b11/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java
index 74f3115..c97c568 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterConfigurationRequestTest.java
@@ -32,6 +32,7 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -254,7 +255,7 @@ public class ClusterConfigurationRequestTest {
       .anyTimes();
 
       expect(ambariContext.getClusterName(Long.valueOf(1))).andReturn("testCluster").anyTimes();
-    expect(ambariContext.createConfigurationRequests(anyObject(Map.class))).andReturn(Collections
+    expect(ambariContext.createConfigurationRequests(EasyMock.<Map<String, Object>>anyObject())).andReturn(Collections
       .<ConfigurationRequest>emptyList()).anyTimes();
 
     if (kerberosConfig == null) {
@@ -263,10 +264,10 @@ public class ClusterConfigurationRequestTest {
       properties.put("testProperty", "KERBEROStestValue");
       kerberosConfig.put("testConfigType", properties);
      }
-    expect(kerberosHelper.ensureHeadlessIdentities(anyObject(Cluster.class), anyObject(Map.class), anyObject
-      (Set.class))).andReturn(true).once();
-    expect(kerberosHelper.getServiceConfigurationUpdates(anyObject(Cluster.class), anyObject(Map.class), anyObject
-      (Map.class), anyObject(Map.class), anyObject(Set.class), anyBoolean(), eq(false))).andReturn(kerberosConfig).once();
+    expect(kerberosHelper.ensureHeadlessIdentities(anyObject(Cluster.class), EasyMock.<Map<String, Map<String, String>>>anyObject(),
+      EasyMock.<Set<String>>anyObject())).andReturn(true).once();
+    expect(kerberosHelper.getServiceConfigurationUpdates(anyObject(Cluster.class), EasyMock.<Map<String, Map<String, String>>>anyObject(),
+      EasyMock.<Map<String, Set<String>>>anyObject(), EasyMock.<Map<String, Collection<String>>>anyObject(), EasyMock.<Set<String>>anyObject(), anyBoolean(), eq(false))).andReturn(kerberosConfig).once();
 
     Capture<? extends String> captureClusterName = newCapture(CaptureType.ALL);
     Capture<? extends Set<String>> captureUpdatedConfigTypes = newCapture(CaptureType.ALL);
@@ -334,7 +335,7 @@ public class ClusterConfigurationRequestTest {
     expect(topology.getHostGroupInfo()).andReturn(Collections.<String, HostGroupInfo>emptyMap()).anyTimes();
     expect(topology.getClusterId()).andReturn(Long.valueOf(1)).anyTimes();
     expect(ambariContext.getClusterName(Long.valueOf(1))).andReturn("testCluster").anyTimes();
-    expect(ambariContext.createConfigurationRequests(anyObject(Map.class))).andReturn(Collections
+    expect(ambariContext.createConfigurationRequests(EasyMock.<Map<String, Object>>anyObject())).andReturn(Collections
       .<ConfigurationRequest>emptyList()).anyTimes();
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/edce0b11/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterDeployWithStartOnlyTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterDeployWithStartOnlyTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterDeployWithStartOnlyTest.java
index dd9b703..c205e57 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterDeployWithStartOnlyTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterDeployWithStartOnlyTest.java
@@ -67,6 +67,7 @@ import org.apache.ambari.server.state.Clusters;
 import org.apache.ambari.server.state.ComponentInfo;
 import org.apache.ambari.server.state.SecurityType;
 import org.easymock.Capture;
+import org.easymock.EasyMock;
 import org.easymock.EasyMockRule;
 import org.easymock.EasyMockSupport;
 import org.easymock.Mock;
@@ -210,7 +211,7 @@ public class ClusterDeployWithStartOnlyTest {
     topoConfiguration.setProperty("service2-site", "s2-prop", "s2-prop-value");
     topoConfiguration.setProperty("cluster-env", "g-prop", "g-prop-value");
 
-    //clusterRequestCapture = new Capture<ClusterRequest>();
+    //clusterRequestCapture = EasyMock.newCapture();
     // group 1 has fqdn specified
     group1Info.addHost("host1");
     group1Info.setConfiguration(topoGroup1Config);

http://git-wip-us.apache.org/repos/asf/ambari/blob/edce0b11/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterInstallWithoutStartOnComponentLevelTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterInstallWithoutStartOnComponentLevelTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterInstallWithoutStartOnComponentLevelTest.java
index 8ba608b..b276ecf 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterInstallWithoutStartOnComponentLevelTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterInstallWithoutStartOnComponentLevelTest.java
@@ -68,6 +68,7 @@ import org.apache.ambari.server.state.Clusters;
 import org.apache.ambari.server.state.ComponentInfo;
 import org.apache.ambari.server.state.SecurityType;
 import org.easymock.Capture;
+import org.easymock.EasyMock;
 import org.easymock.EasyMockRule;
 import org.easymock.EasyMockSupport;
 import org.easymock.Mock;
@@ -206,7 +207,7 @@ public class ClusterInstallWithoutStartOnComponentLevelTest {
     topoConfiguration.setProperty("service2-site", "s2-prop", "s2-prop-value");
     topoConfiguration.setProperty("cluster-env", "g-prop", "g-prop-value");
 
-    //clusterRequestCapture = new Capture<ClusterRequest>();
+    //clusterRequestCapture = EasyMock.newCapture();
     // group 1 has fqdn specified
     group1Info.addHost("host1");
     group1Info.setConfiguration(topoGroup1Config);

http://git-wip-us.apache.org/repos/asf/ambari/blob/edce0b11/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterInstallWithoutStartTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterInstallWithoutStartTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterInstallWithoutStartTest.java
index 63dd0a0..58862f1 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterInstallWithoutStartTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/ClusterInstallWithoutStartTest.java
@@ -68,6 +68,7 @@ import org.apache.ambari.server.state.Clusters;
 import org.apache.ambari.server.state.ComponentInfo;
 import org.apache.ambari.server.state.SecurityType;
 import org.easymock.Capture;
+import org.easymock.EasyMock;
 import org.easymock.EasyMockRule;
 import org.easymock.EasyMockSupport;
 import org.easymock.Mock;
@@ -206,7 +207,7 @@ public class ClusterInstallWithoutStartTest {
     topoConfiguration.setProperty("service2-site", "s2-prop", "s2-prop-value");
     topoConfiguration.setProperty("cluster-env", "g-prop", "g-prop-value");
 
-    //clusterRequestCapture = new Capture<ClusterRequest>();
+    //clusterRequestCapture = EasyMock.newCapture();
     // group 1 has fqdn specified
     group1Info.addHost("host1");
     group1Info.setConfiguration(topoGroup1Config);

http://git-wip-us.apache.org/repos/asf/ambari/blob/edce0b11/ambari-server/src/test/java/org/apache/ambari/server/topology/ConfigureClusterTaskTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/ConfigureClusterTaskTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/ConfigureClusterTaskTest.java
index 53bcdc3..aa7ba0e 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/ConfigureClusterTaskTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/ConfigureClusterTaskTest.java
@@ -74,8 +74,8 @@ public class ConfigureClusterTaskTest {
       Exception {
     // GIVEN
     // is it OK to handle the non existence of hostgroups as a success?!
-    expect(clusterConfigurationRequest.getRequiredHostGroups()).andReturn(Collections.EMPTY_LIST);
-    expect(clusterTopology.getHostGroupInfo()).andReturn(Collections.EMPTY_MAP);
+    expect(clusterConfigurationRequest.getRequiredHostGroups()).andReturn(Collections.<String>emptyList());
+    expect(clusterTopology.getHostGroupInfo()).andReturn(Collections.<String, HostGroupInfo>emptyMap());
 
     // this is only called if the "prerequisites" are satisfied
     clusterConfigurationRequest.process();
@@ -94,8 +94,8 @@ public class ConfigureClusterTaskTest {
   public void testsShouldConfigureClusterTaskExecuteWhenCalledFromAsyncCallableService() throws Exception {
     // GIVEN
     // is it OK to handle the non existence of hostgroups as a success?!
-    expect(clusterConfigurationRequest.getRequiredHostGroups()).andReturn(Collections.EMPTY_LIST);
-    expect(clusterTopology.getHostGroupInfo()).andReturn(Collections.EMPTY_MAP);
+    expect(clusterConfigurationRequest.getRequiredHostGroups()).andReturn(Collections.<String>emptyList());
+    expect(clusterTopology.getHostGroupInfo()).andReturn(Collections.<String, HostGroupInfo>emptyMap());
 
     // this is only called if the "prerequisites" are satisfied
     clusterConfigurationRequest.process();

http://git-wip-us.apache.org/repos/asf/ambari/blob/edce0b11/ambari-server/src/test/java/org/apache/ambari/server/topology/HostGroupInfoTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/HostGroupInfoTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/HostGroupInfoTest.java
index 0efa9ad..93015e2 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/HostGroupInfoTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/HostGroupInfoTest.java
@@ -112,7 +112,7 @@ public class HostGroupInfoTest {
 
     group.setPredicate("Hosts/host_name=awesome.host.com");
     assertEquals("Hosts/host_name=awesome.host.com", group.getPredicateString());
-    assertEquals(new EqualsPredicate("Hosts/host_name", "awesome.host.com"), group.getPredicate());
+    assertEquals(new EqualsPredicate<>("Hosts/host_name", "awesome.host.com"), group.getPredicate());
   }
 
   @Test(expected=InvalidQueryException.class)

http://git-wip-us.apache.org/repos/asf/ambari/blob/edce0b11/ambari-server/src/test/java/org/apache/ambari/server/topology/TopologyManagerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/TopologyManagerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/TopologyManagerTest.java
index dad660c..7e6e5a3 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/TopologyManagerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/TopologyManagerTest.java
@@ -189,7 +189,7 @@ public class TopologyManagerTest {
     topoConfiguration.setProperty("service2-site", "s2-prop", "s2-prop-value");
     topoConfiguration.setProperty("cluster-env", "g-prop", "g-prop-value");
 
-    //clusterRequestCapture = new Capture<ClusterRequest>();
+    //clusterRequestCapture = EasyMock.newCapture();
     // group 1 has fqdn specified
     group1Info.addHost("host1");
     group1Info.setConfiguration(topoGroup1Config);

http://git-wip-us.apache.org/repos/asf/ambari/blob/edce0b11/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java
index b00f9f0..87cea1b 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java
@@ -84,6 +84,7 @@ import org.apache.ambari.server.state.StackId;
 import org.apache.ambari.server.state.StackInfo;
 import org.apache.ambari.server.state.stack.OsFamily;
 import org.easymock.Capture;
+import org.easymock.EasyMock;
 import org.easymock.EasyMockSupport;
 import org.junit.After;
 import org.junit.Assert;
@@ -138,34 +139,34 @@ public class UpgradeCatalog200Test {
 
     expect(configuration.getDatabaseUrl()).andReturn(Configuration.JDBC_IN_MEMORY_URL).anyTimes();
 
-    Capture<DBAccessor.DBColumnInfo> alertDefinitionIgnoreColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-    Capture<DBAccessor.DBColumnInfo> alertDefinitionDescriptionColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-    Capture<DBAccessor.DBColumnInfo> alertTargetGlobalColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-    Capture<DBAccessor.DBColumnInfo> hostComponentStateColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-    Capture<DBAccessor.DBColumnInfo> hostComponentVersionColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-    Capture<DBAccessor.DBColumnInfo> clustersSecurityTypeColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-    Capture<DBAccessor.DBColumnInfo> hostComponentStateSecurityStateColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-    Capture<DBAccessor.DBColumnInfo> hostComponentDesiredStateSecurityStateColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-    Capture<DBAccessor.DBColumnInfo> hostRoleCommandRetryColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-    Capture<DBAccessor.DBColumnInfo> stageSkippableColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-
-    Capture<DBAccessor.DBColumnInfo> viewparameterLabelColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-    Capture<DBAccessor.DBColumnInfo> viewparameterPlaceholderColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-    Capture<DBAccessor.DBColumnInfo> viewparameterDefaultValueColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-
-    Capture<DBAccessor.DBColumnInfo> serviceDesiredStateSecurityStateColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-    Capture<List<DBAccessor.DBColumnInfo>> clusterVersionCapture = new Capture<List<DBAccessor.DBColumnInfo>>();
-    Capture<List<DBAccessor.DBColumnInfo>> hostVersionCapture = new Capture<List<DBAccessor.DBColumnInfo>>();
-    Capture<DBAccessor.DBColumnInfo> valueColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-    Capture<DBAccessor.DBColumnInfo> dataValueColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-    Capture<List<DBAccessor.DBColumnInfo>> alertTargetStatesCapture = new Capture<List<DBAccessor.DBColumnInfo>>();
-    Capture<List<DBAccessor.DBColumnInfo>> artifactCapture = new Capture<List<DBAccessor.DBColumnInfo>>();
-    Capture<List<DBAccessor.DBColumnInfo>> kerberosPrincipalCapture = new Capture<List<DBAccessor.DBColumnInfo>>();
-    Capture<List<DBAccessor.DBColumnInfo>> kerberosPrincipalHostCapture = new Capture<List<DBAccessor.DBColumnInfo>>();
-
-    Capture<List<DBAccessor.DBColumnInfo>> upgradeCapture = new Capture<List<DBAccessor.DBColumnInfo>>();
-    Capture<List<DBAccessor.DBColumnInfo>> upgradeGroupCapture = new Capture<List<DBAccessor.DBColumnInfo>>();
-    Capture<List<DBAccessor.DBColumnInfo>> upgradeItemCapture = new Capture<List<DBAccessor.DBColumnInfo>>();
+    Capture<DBAccessor.DBColumnInfo> alertDefinitionIgnoreColumnCapture = EasyMock.newCapture();
+    Capture<DBAccessor.DBColumnInfo> alertDefinitionDescriptionColumnCapture = EasyMock.newCapture();
+    Capture<DBAccessor.DBColumnInfo> alertTargetGlobalColumnCapture = EasyMock.newCapture();
+    Capture<DBAccessor.DBColumnInfo> hostComponentStateColumnCapture = EasyMock.newCapture();
+    Capture<DBAccessor.DBColumnInfo> hostComponentVersionColumnCapture = EasyMock.newCapture();
+    Capture<DBAccessor.DBColumnInfo> clustersSecurityTypeColumnCapture = EasyMock.newCapture();
+    Capture<DBAccessor.DBColumnInfo> hostComponentStateSecurityStateColumnCapture = EasyMock.newCapture();
+    Capture<DBAccessor.DBColumnInfo> hostComponentDesiredStateSecurityStateColumnCapture = EasyMock.newCapture();
+    Capture<DBAccessor.DBColumnInfo> hostRoleCommandRetryColumnCapture = EasyMock.newCapture();
+    Capture<DBAccessor.DBColumnInfo> stageSkippableColumnCapture = EasyMock.newCapture();
+
+    Capture<DBAccessor.DBColumnInfo> viewparameterLabelColumnCapture = EasyMock.newCapture();
+    Capture<DBAccessor.DBColumnInfo> viewparameterPlaceholderColumnCapture = EasyMock.newCapture();
+    Capture<DBAccessor.DBColumnInfo> viewparameterDefaultValueColumnCapture = EasyMock.newCapture();
+
+    Capture<DBAccessor.DBColumnInfo> serviceDesiredStateSecurityStateColumnCapture = EasyMock.newCapture();
+    Capture<List<DBAccessor.DBColumnInfo>> clusterVersionCapture = EasyMock.newCapture();
+    Capture<List<DBAccessor.DBColumnInfo>> hostVersionCapture = EasyMock.newCapture();
+    Capture<DBAccessor.DBColumnInfo> valueColumnCapture = EasyMock.newCapture();
+    Capture<DBAccessor.DBColumnInfo> dataValueColumnCapture = EasyMock.newCapture();
+    Capture<List<DBAccessor.DBColumnInfo>> alertTargetStatesCapture = EasyMock.newCapture();
+    Capture<List<DBAccessor.DBColumnInfo>> artifactCapture = EasyMock.newCapture();
+    Capture<List<DBAccessor.DBColumnInfo>> kerberosPrincipalCapture = EasyMock.newCapture();
+    Capture<List<DBAccessor.DBColumnInfo>> kerberosPrincipalHostCapture = EasyMock.newCapture();
+
+    Capture<List<DBAccessor.DBColumnInfo>> upgradeCapture = EasyMock.newCapture();
+    Capture<List<DBAccessor.DBColumnInfo>> upgradeGroupCapture = EasyMock.newCapture();
+    Capture<List<DBAccessor.DBColumnInfo>> upgradeItemCapture = EasyMock.newCapture();
 
     // Alert Definition
     dbAccessor.addColumn(eq("alert_definition"),

http://git-wip-us.apache.org/repos/asf/ambari/blob/edce0b11/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java
index 0835823..36f66c6 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java
@@ -87,6 +87,7 @@ import org.apache.ambari.server.state.kerberos.KerberosServiceDescriptor;
 import org.apache.ambari.server.state.stack.OsFamily;
 import org.easymock.Capture;
 import org.easymock.CaptureType;
+import org.easymock.EasyMock;
 import org.easymock.EasyMockSupport;
 import org.junit.Assert;
 import org.junit.Test;
@@ -353,9 +354,9 @@ public class UpgradeCatalog210Test {
       put("normal", mockClusterExpected);
     }}).once();
 
-    Capture<String> configTypeEnv = new Capture<String>();
-    Capture<String> configTypeSite = new Capture<String>();
-    Capture<String> configTypeServerSite = new Capture<String>();
+    Capture<String> configTypeEnv = EasyMock.newCapture();
+    Capture<String> configTypeSite = EasyMock.newCapture();
+    Capture<String> configTypeServerSite = EasyMock.newCapture();
 
     expect(mockClusterExpected.getDesiredConfigByType("hive-env")).andReturn(mockHiveEnv).atLeastOnce();
     expect(mockClusterExpected.getDesiredConfigByType("hiveserver2-site")).andReturn(mockHiveServerSite).atLeastOnce();
@@ -517,7 +518,7 @@ public class UpgradeCatalog210Test {
       anyString(),
       capture(configCreation),
       anyString(),
-      (Map<String, Map<String, String>>)anyObject())).andReturn(null).atLeastOnce();
+      EasyMock.<Map<String, Map<String, String>>>anyObject())).andReturn(null).atLeastOnce();
 
     easyMockSupport.replayAll();
     upgradeCatalog210.updateHiveConfigs();
@@ -602,7 +603,7 @@ public class UpgradeCatalog210Test {
         anyString(),
         capture(configCreation),
         anyString(),
-        (Map<String, Map<String, String>>) anyObject())).andReturn(null).atLeastOnce();
+        EasyMock.<Map<String, Map<String, String>>>anyObject())).andReturn(null).atLeastOnce();
 
     easyMockSupport.replayAll();
     upgradeCatalog210.updateHiveConfigs();
@@ -792,8 +793,8 @@ public class UpgradeCatalog210Test {
     expect(mockHBaseSite.getProperties()).andReturn(propertiesExpectedHBaseSite).anyTimes();
     expect(mockHBaseEnv.getProperties()).andReturn(propertiesExpectedHBaseEnv).anyTimes();
 
-    Capture<String> configType = new Capture<String>();
-    Capture<String> configTag = new Capture<String>();
+    Capture<String> configType = EasyMock.newCapture();
+    Capture<String> configTag = EasyMock.newCapture();
     expect(mockClusterExpected.getConfig(capture(configType), capture(configTag))).
             andReturn(mockHBaseSite).atLeastOnce();
 
@@ -977,7 +978,7 @@ public class UpgradeCatalog210Test {
 
     UpgradeCatalog210 upgradeMock = createMockBuilder(UpgradeCatalog210.class).createMock();
 
-    Capture<Map<String, Object>> updatedData = new Capture<Map<String, Object>>();
+    Capture<Map<String, Object>> updatedData = EasyMock.newCapture();
 
     ArtifactEntity artifactEntity = createNiceMock(ArtifactEntity.class);
     expect(artifactEntity.getArtifactData())
@@ -1029,7 +1030,7 @@ public class UpgradeCatalog210Test {
 
     UpgradeCatalog210 upgradeMock = createMockBuilder(UpgradeCatalog210.class).createMock();
 
-    Capture<Map<String, Object>> updatedData = new Capture<Map<String, Object>>();
+    Capture<Map<String, Object>> updatedData = EasyMock.newCapture();
 
     ArtifactEntity artifactEntity = createNiceMock(ArtifactEntity.class);
     expect(artifactEntity.getArtifactData())
@@ -1074,18 +1075,18 @@ public class UpgradeCatalog210Test {
 
       // Column Capture section
       // Hosts
-      Capture<DBAccessor.DBColumnInfo> clusterHostMappingColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-      Capture<DBAccessor.DBColumnInfo> configGroupHostMappingColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-      Capture<DBAccessor.DBColumnInfo> hostConfigMappingColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-      Capture<DBAccessor.DBColumnInfo> hostsColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-      Capture<DBAccessor.DBColumnInfo> hostComponentStateColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-      Capture<DBAccessor.DBColumnInfo> hostComponentDesiredStateColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-      Capture<DBAccessor.DBColumnInfo> hostRoleCommandColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-      Capture<DBAccessor.DBColumnInfo> hostStateColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-      Capture<DBAccessor.DBColumnInfo> hostVersionColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-      Capture<DBAccessor.DBColumnInfo> kerberosPrincipalHostColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-      Capture<DBAccessor.DBColumnInfo> requestOperationLevelColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-      Capture<DBAccessor.DBColumnInfo> serviceConfigHostsColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
+      Capture<DBAccessor.DBColumnInfo> clusterHostMappingColumnCapture = EasyMock.newCapture();
+      Capture<DBAccessor.DBColumnInfo> configGroupHostMappingColumnCapture = EasyMock.newCapture();
+      Capture<DBAccessor.DBColumnInfo> hostConfigMappingColumnCapture = EasyMock.newCapture();
+      Capture<DBAccessor.DBColumnInfo> hostsColumnCapture = EasyMock.newCapture();
+      Capture<DBAccessor.DBColumnInfo> hostComponentStateColumnCapture = EasyMock.newCapture();
+      Capture<DBAccessor.DBColumnInfo> hostComponentDesiredStateColumnCapture = EasyMock.newCapture();
+      Capture<DBAccessor.DBColumnInfo> hostRoleCommandColumnCapture = EasyMock.newCapture();
+      Capture<DBAccessor.DBColumnInfo> hostStateColumnCapture = EasyMock.newCapture();
+      Capture<DBAccessor.DBColumnInfo> hostVersionColumnCapture = EasyMock.newCapture();
+      Capture<DBAccessor.DBColumnInfo> kerberosPrincipalHostColumnCapture = EasyMock.newCapture();
+      Capture<DBAccessor.DBColumnInfo> requestOperationLevelColumnCapture = EasyMock.newCapture();
+      Capture<DBAccessor.DBColumnInfo> serviceConfigHostsColumnCapture = EasyMock.newCapture();
 
       captures.put("ClusterHostMapping", clusterHostMappingColumnCapture);
       captures.put("configgrouphostmapping", configGroupHostMappingColumnCapture);
@@ -1156,14 +1157,14 @@ public class UpgradeCatalog210Test {
     public WidgetSectionDDL() {
       captures = new HashMap<String, Capture<List<DBColumnInfo>>>();
 
-      Capture<List<DBColumnInfo>> userWidgetColumnsCapture = new Capture<List<DBColumnInfo>>();
-      Capture<List<DBColumnInfo>> widgetLayoutColumnsCapture = new Capture<List<DBColumnInfo>>();
-      Capture<List<DBColumnInfo>> widgetLayoutUserWidgetColumnsCapture = new Capture<List<DBColumnInfo>>();
+      Capture<List<DBColumnInfo>> userWidgetColumnsCapture = EasyMock.newCapture();
+      Capture<List<DBColumnInfo>> widgetLayoutColumnsCapture = EasyMock.newCapture();
+      Capture<List<DBColumnInfo>> widgetLayoutUserWidgetColumnsCapture = EasyMock.newCapture();
 
       captures.put("widget", userWidgetColumnsCapture);
       captures.put("widget_layout", widgetLayoutColumnsCapture);
       captures.put("widget_layout_user_widget", widgetLayoutUserWidgetColumnsCapture);
-      userActiveLayoutsColumnCapture = new Capture<DBColumnInfo>();
+      userActiveLayoutsColumnCapture = EasyMock.newCapture();
     }
 
     /**
@@ -1220,10 +1221,10 @@ public class UpgradeCatalog210Test {
     public ViewSectionDDL() {
       captures = new HashMap<String, Capture<DBColumnInfo>>();
 
-      Capture<DBAccessor.DBColumnInfo> viewInstanceColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-      Capture<DBAccessor.DBColumnInfo> viewInstanceAlterNamesColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-      Capture<DBAccessor.DBColumnInfo> viewParamColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
-      Capture<DBAccessor.DBColumnInfo> viewBuildColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
+      Capture<DBAccessor.DBColumnInfo> viewInstanceColumnCapture = EasyMock.newCapture();
+      Capture<DBAccessor.DBColumnInfo> viewInstanceAlterNamesColumnCapture = EasyMock.newCapture();
+      Capture<DBAccessor.DBColumnInfo> viewParamColumnCapture = EasyMock.newCapture();
+      Capture<DBAccessor.DBColumnInfo> viewBuildColumnCapture = EasyMock.newCapture();
 
       captures.put("viewinstance", viewInstanceColumnCapture);
       captures.put("viewinstance_alter_names", viewInstanceAlterNamesColumnCapture);
@@ -1295,12 +1296,12 @@ public class UpgradeCatalog210Test {
       stringCaptures = new HashMap<String, Capture<String>>();
       classCaptures = new HashMap<String, Capture<Class>>();
 
-      Capture<String> textCaptureC = new Capture<String>();
-      Capture<String> textCaptureH = new Capture<String>();
-      Capture<Class>  classFromC = new Capture<Class>();
-      Capture<Class>  classFromH = new Capture<Class>();
-      Capture<Class>  classToC = new Capture<Class>();
-      Capture<Class>  classToH = new Capture<Class>();
+      Capture<String> textCaptureC = EasyMock.newCapture();
+      Capture<String> textCaptureH = EasyMock.newCapture();
+      Capture<Class>  classFromC = EasyMock.newCapture();
+      Capture<Class>  classFromH = EasyMock.newCapture();
+      Capture<Class>  classToC = EasyMock.newCapture();
+      Capture<Class>  classToH = EasyMock.newCapture();
 
       stringCaptures.put("textCaptureC", textCaptureC);
       stringCaptures.put("textCaptureH", textCaptureH);

http://git-wip-us.apache.org/repos/asf/ambari/blob/edce0b11/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog211Test.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog211Test.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog211Test.java
index 094a2d9..c705d89 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog211Test.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog211Test.java
@@ -50,6 +50,7 @@ import org.apache.ambari.server.state.Clusters;
 import org.apache.ambari.server.state.Config;
 import org.apache.ambari.server.state.stack.OsFamily;
 import org.easymock.Capture;
+import org.easymock.EasyMock;
 import org.easymock.EasyMockSupport;
 import org.junit.Assert;
 import org.junit.Test;
@@ -96,7 +97,7 @@ public class UpgradeCatalog211Test extends EasyMockSupport {
       statement.executeQuery(anyObject(String.class));
       expectLastCall().andReturn(rs1).anyTimes();
 
-      Capture<String> queryCapture = new Capture<String>();
+      Capture<String> queryCapture = EasyMock.newCapture();
       dbAccessor.executeQuery(capture(queryCapture));
       expectLastCall().once();
 
@@ -259,12 +260,12 @@ public class UpgradeCatalog211Test extends EasyMockSupport {
         .andReturn(configKerberosEnv)
         .once();
 
-    Capture<ConfigurationRequest> captureCR = new Capture<ConfigurationRequest>();
+    Capture<ConfigurationRequest> captureCR = EasyMock.newCapture();
     Capture<Cluster> clusterCapture = newCapture();
     Capture<String> typeCapture = newCapture();
-    Capture<Map> propertiesCapture = newCapture();
+    Capture<Map<String, String>> propertiesCapture = newCapture();
     Capture<String> tagCapture = newCapture();
-    Capture<Map> attributesCapture = newCapture();
+    Capture<Map<String, Map<String, String>>> attributesCapture = newCapture();
 
 
     expect(controller.createConfig(capture(clusterCapture), capture(typeCapture),
@@ -394,12 +395,12 @@ public class UpgradeCatalog211Test extends EasyMockSupport {
       stringCaptures = new HashMap<String, Capture<String>>();
       classCaptures = new HashMap<String, Capture<Class>>();
 
-      Capture<String> textCaptureC = new Capture<String>();
-      Capture<String> textCaptureH = new Capture<String>();
-      Capture<Class>  classFromC = new Capture<Class>();
-      Capture<Class>  classFromH = new Capture<Class>();
-      Capture<Class>  classToC = new Capture<Class>();
-      Capture<Class>  classToH = new Capture<Class>();
+      Capture<String> textCaptureC = EasyMock.newCapture();
+      Capture<String> textCaptureH = EasyMock.newCapture();
+      Capture<Class>  classFromC = EasyMock.newCapture();
+      Capture<Class>  classFromH = EasyMock.newCapture();
+      Capture<Class>  classToC = EasyMock.newCapture();
+      Capture<Class>  classToH = EasyMock.newCapture();
 
       stringCaptures.put("textCaptureC", textCaptureC);
       stringCaptures.put("textCaptureH", textCaptureH);

http://git-wip-us.apache.org/repos/asf/ambari/blob/edce0b11/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog212Test.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog212Test.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog212Test.java
index 90a2549..d15ca25 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog212Test.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog212Test.java
@@ -59,6 +59,7 @@ import org.apache.ambari.server.state.ConfigHelper;
 import org.apache.ambari.server.state.StackId;
 import org.apache.ambari.server.state.stack.OsFamily;
 import org.easymock.Capture;
+import org.easymock.EasyMock;
 import org.easymock.EasyMockRule;
 import org.easymock.EasyMockSupport;
 import org.easymock.Mock;
@@ -466,7 +467,7 @@ public class UpgradeCatalog212Test {
     public HostRoleCommandDDL() {
       captures = new HashMap<String, Capture<DBColumnInfo>>();
 
-      Capture<DBAccessor.DBColumnInfo> hostRoleCommandAutoSkipColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
+      Capture<DBAccessor.DBColumnInfo> hostRoleCommandAutoSkipColumnCapture = EasyMock.newCapture();
 
       captures.put("host_role_command", hostRoleCommandAutoSkipColumnCapture);
     }


Mime
View raw message