### Question:
UsualClient extends BaseClient { @Override public synchronized void useExecStrategy(final StrategyType strategyType) { if (strategies.containsKey(strategyType)) { execStrategy = strategies.get(strategyType); return; } IZookeeperTransactionProvider provider = new ZookeeperTransactionProvider(getRootNode(), getHolder(), ZookeeperConstants.WATCHED, getAuthorities()); switch (strategyType) { case USUAL: execStrategy = new UsualStrategy(provider); break; case CONTEND: execStrategy = new ContentionStrategy(provider); break; case TRANSACTION_CONTEND: execStrategy = new TransactionContendStrategy(provider); break; case SYNC_RETRY: execStrategy = new SyncRetryStrategy(provider, ((ClientContext) getContext()).getDelayRetryPolicy()); break; case ASYNC_RETRY: execStrategy = new AsyncRetryStrategy(provider, ((ClientContext) getContext()).getDelayRetryPolicy()); break; default: execStrategy = new UsualStrategy(provider); break; } strategies.put(strategyType, execStrategy); } protected  UsualClient(final BaseContext context); @Override void close(); @Override synchronized void useExecStrategy(final StrategyType strategyType); @Override String getDataString(final String key); @Override byte[] getData(final String key); @Override void getData(final String key, final AsyncCallback.DataCallback callback, final Object ctx); @Override boolean checkExists(final String key); @Override boolean checkExists(final String key, final Watcher watcher); @Override List<String> getChildren(final String key); @Override void createCurrentOnly(final String key, final String value, final CreateMode createMode); @Override void createAllNeedPath(final String key, final String value, final CreateMode createMode); @Override void update(final String key, final String value); @Override void deleteOnlyCurrent(final String key); @Override void deleteOnlyCurrent(final String key, final AsyncCallback.VoidCallback callback, final Object ctx); @Override void deleteAllChildren(final String key); @Override void deleteCurrentBranch(final String key); @Override BaseTransaction transaction();  }### Answer:
@Test public void assertUseExecStrategy() { getTestClient().useExecStrategy(StrategyType.CONTEND); assertThat(getTestClient().getExecStrategy().getClass().getName(), is(ContentionStrategy.class.getName())); getTestClient().useExecStrategy(StrategyType.TRANSACTION_CONTEND); assertThat(getTestClient().getExecStrategy().getClass().getName(), is(TransactionContendStrategy.class.getName())); getTestClient().useExecStrategy(StrategyType.SYNC_RETRY); assertThat(getTestClient().getExecStrategy().getClass().getName(), is(SyncRetryStrategy.class.getName())); getTestClient().useExecStrategy(StrategyType.ASYNC_RETRY); assertThat(getTestClient().getExecStrategy().getClass().getName(), is(AsyncRetryStrategy.class.getName())); getTestClient().useExecStrategy(StrategyType.USUAL); assertThat(getTestClient().getExecStrategy().getClass().getName(), is(UsualStrategy.class.getName())); }