### Question:
ConfiguratorBase { public static void setClientProperties(Class<?> implementingClass, Configuration conf, Properties props, String clientPropsPath) { if (clientPropsPath != null) { DistributedCacheHelper.addCacheFile(clientPropsPath, cachedClientPropsFileName(implementingClass), conf); conf.set(enumToConfKey(implementingClass, ClientOpts.CLIENT_PROPS_FILE), clientPropsPath); } else { StringWriter writer = new StringWriter(); try { props.store(writer, "client properties"); } catch (IOException e) { throw new IllegalStateException(e); } conf.set(enumToConfKey(implementingClass, ClientOpts.CLIENT_PROPS), writer.toString()); } conf.setBoolean(enumToConfKey(implementingClass, ClientOpts.IS_CONFIGURED), true); }  static void setClientProperties(Class<?> implementingClass, Configuration conf,
      Properties props, String clientPropsPath); static Properties getClientProperties(Class<?> implementingClass, Configuration conf); static Boolean isClientConfigured(Class<?> implementingClass, Configuration conf); static AccumuloClient createClient(Class<?> implementingClass, Configuration conf); static void setVisibilityCacheSize(Configuration conf, int visibilityCacheSize); static int getVisibilityCacheSize(Configuration conf); static void setJobStored(Class<?> implementingClass, Configuration conf); static void checkJobStored(Class<?> implementingClass, Configuration conf);  }### Answer:
@Test public void testSetClientProperties() { Configuration conf = new Configuration(); Properties props = Accumulo.newClientProperties().to("myinstance", "myzookeepers").as("user", "pass").build(); assertFalse(ConfiguratorBase.isClientConfigured(this.getClass(), conf)); ConfiguratorBase.setClientProperties(this.getClass(), conf, props, null); assertTrue(ConfiguratorBase.isClientConfigured(this.getClass(), conf)); Properties props2 = ConfiguratorBase.getClientProperties(this.getClass(), conf); ClientInfo info2 = ClientInfo.from(props2); assertEquals("myinstance", info2.getInstanceName()); assertEquals("myzookeepers", info2.getZooKeepers()); assertEquals("user", info2.getPrincipal()); assertTrue(info2.getAuthenticationToken() instanceof PasswordToken); }