### Question:
LeafQueue implements CSQueue { @Override public void submitApplicationAttempt(FiCaSchedulerApp application, String userName) { synchronized (this) { User user = getUser(userName); addApplicationAttempt(application, user); } metrics.submitAppAttempt(userName); getParent().submitApplicationAttempt(application, userName); } LeafQueue(CapacitySchedulerContext cs, 
      String queueName, CSQueue parent, CSQueue old); @Override synchronized float getCapacity(); @Override synchronized float getAbsoluteCapacity(); @Override synchronized float getMaximumCapacity(); @Override synchronized float getAbsoluteMaximumCapacity(); @Override synchronized float getAbsoluteUsedCapacity(); @Override synchronized CSQueue getParent(); @Override synchronized void setParent(CSQueue newParentQueue); @Override String getQueueName(); @Override String getQueuePath(); @Private Resource getMinimumAllocation(); @Private Resource getMaximumAllocation(); @Private float getMinimumAllocationFactor(); @Private float getMaxAMResourcePerQueuePercent(); int getMaxApplications(); synchronized int getMaxApplicationsPerUser(); synchronized int getMaximumActiveApplications(); synchronized int getMaximumActiveApplicationsPerUser(); @Override ActiveUsersManager getActiveUsersManager(); @Override synchronized float getUsedCapacity(); @Override synchronized Resource getUsedResources(); @Override List<CSQueue> getChildQueues(); @Override synchronized void setUsedCapacity(float usedCapacity); @Override synchronized void setAbsoluteUsedCapacity(float absUsedCapacity); @Override synchronized int getNumApplications(); synchronized int getNumPendingApplications(); synchronized int getNumActiveApplications(); @Private synchronized int getNumApplications(String user); @Private synchronized int getNumPendingApplications(String user); @Private synchronized int getNumActiveApplications(String user); synchronized int getNumContainers(); @Override synchronized QueueState getState(); @Private synchronized int getUserLimit(); @Private synchronized float getUserLimitFactor(); @Override synchronized QueueInfo getQueueInfo(
      boolean includeChildQueues, boolean recursive); @Override synchronized List<QueueUserACLInfo> getQueueUserAclInfo(UserGroupInformation user); @Private int getNodeLocalityDelay(); String toString(); synchronized ArrayList<UserInfo> getUsers(); @Override synchronized void reinitialize(
      CSQueue newlyParsedQueue, Resource clusterResource); @Override boolean hasAccess(QueueACL acl, UserGroupInformation user); @Override void submitApplicationAttempt(FiCaSchedulerApp application,
      String userName); @Override void submitApplication(ApplicationId applicationId, String userName,
      String queue); @Override void finishApplication(ApplicationId application, String user); @Override void finishApplicationAttempt(FiCaSchedulerApp application, String queue); synchronized void removeApplicationAttempt(FiCaSchedulerApp application, User user); @Override synchronized CSAssignment assignContainers(Resource clusterResource, FiCaSchedulerNode node); @Override void completedContainer(Resource clusterResource, 
      FiCaSchedulerApp application, FiCaSchedulerNode node, RMContainer rmContainer, 
      ContainerStatus containerStatus, RMContainerEventType event, CSQueue childQueue); @Override synchronized void updateClusterResource(Resource clusterResource); @Override QueueMetrics getMetrics(); @Override void recoverContainer(Resource clusterResource,
      FiCaSchedulerApp application, Container container); Set<FiCaSchedulerApp> getApplications(); Resource getTotalResourcePending(); @Override void collectSchedulerApplications(
      Collection<ApplicationAttemptId> apps);  }### Answer:
@Test public void testUserQueueAcl() throws Exception { LeafQueue d = stubLeafQueue((LeafQueue) queues.get(D)); final String user_d = "user_d"; final ApplicationAttemptId appAttemptId_0 = TestUtils .getMockApplicationAttemptId(0, 1); FiCaSchedulerApp app_0 = new FiCaSchedulerApp(appAttemptId_0, user_d, d, null, rmContext); d.submitApplicationAttempt(app_0, user_d); final ApplicationAttemptId appAttemptId_1 = TestUtils .getMockApplicationAttemptId(0, 2); FiCaSchedulerApp app_1 = new FiCaSchedulerApp(appAttemptId_1, user_d, d, null, rmContext); d.submitApplicationAttempt(app_1, user_d); }