### Question:
MiniAccumuloClusterImpl implements AccumuloCluster { public MasterMonitorInfo getMasterMonitorInfo() throws AccumuloException, AccumuloSecurityException { MasterClientService.Iface client = null; while (true) { try (AccumuloClient c = Accumulo.newClient().from(getClientProperties()).build()) { client = MasterClient.getConnectionWithRetry((ClientContext) c); return client.getMasterStats(TraceUtil.traceInfo(), ((ClientContext) c).rpcCreds()); } catch (ThriftSecurityException exception) { throw new AccumuloSecurityException(exception); } catch (ThriftNotActiveServiceException e) { log.debug("Contacted a Master which is no longer active, retrying"); sleepUninterruptibly(100, TimeUnit.MILLISECONDS); } catch (TException exception) { throw new AccumuloException(exception); } finally { if (client != null) { MasterClient.close(client); } } } } MiniAccumuloClusterImpl(File dir, String rootPassword); @SuppressWarnings("deprecation")  MiniAccumuloClusterImpl(MiniAccumuloConfigImpl config); ProcessInfo exec(Class<?> clazz, String... args); ProcessInfo exec(Class<?> clazz, List<String> jvmArgs, String... args); ProcessInfo _exec(Class<?> clazz, ServerType serverType,
      Map<String,String> configOverrides, String... args); @SuppressFBWarnings(value = "UNENCRYPTED_SOCKET", justification = "insecure socket used for reservation") @Override synchronized void start(); Set<Pair<ServerType,Integer>> getDebugPorts(); Map<ServerType,Collection<ProcessReference>> getProcesses(); void killProcess(ServerType type, ProcessReference proc); @Override String getInstanceName(); @Override String getZooKeepers(); @Override synchronized ServerContext getServerContext(); @Override synchronized void stop(); MiniAccumuloConfigImpl getConfig(); @Override AccumuloClient createAccumuloClient(String user, AuthenticationToken token); @SuppressWarnings("deprecation") @Override org.apache.accumulo.core.client.ClientConfiguration getClientConfig(); @Override synchronized Properties getClientProperties(); @Override FileSystem getFileSystem(); MasterMonitorInfo getMasterMonitorInfo(); synchronized MiniDFSCluster getMiniDfs(); @Override MiniAccumuloClusterControl getClusterControl(); @Override Path getTemporaryPath(); @Override AccumuloConfiguration getSiteConfiguration(); @Override String getAccumuloPropertiesPath(); @Override String getClientPropsPath();  }### Answer:
@Test(timeout = 60000) public void saneMonitorInfo() throws Exception { MasterMonitorInfo stats; while (true) { stats = accumulo.getMasterMonitorInfo(); if (stats.tableMap.size() <= 2) { continue; } if (null != stats.tServerInfo && stats.tServerInfo.size() == NUM_TSERVERS) { break; } } List<MasterState> validStates = Arrays.asList(MasterState.values()); List<MasterGoalState> validGoals = Arrays.asList(MasterGoalState.values()); assertTrue("master state should be valid.", validStates.contains(stats.state)); assertTrue("master goal state should be in " + validGoals + ". is " + stats.goalState, validGoals.contains(stats.goalState)); assertNotNull("should have a table map.", stats.tableMap); assertTrue("root table should exist in " + stats.tableMap.keySet(), stats.tableMap.containsKey(RootTable.ID.canonical())); assertTrue("meta table should exist in " + stats.tableMap.keySet(), stats.tableMap.containsKey(MetadataTable.ID.canonical())); assertTrue("our test table should exist in " + stats.tableMap.keySet(), stats.tableMap.containsKey(testTableID)); assertNotNull("there should be tservers.", stats.tServerInfo); assertEquals(NUM_TSERVERS, stats.tServerInfo.size()); }