ApolloOpenApiWrapper { public String getValue(final String key) { OpenItemDTO itemDTO = client.getItem(appId, env, clusterName, namespace, key); if (itemDTO == null) { return null; } return itemDTO.getValue(); } ApolloOpenApiWrapper(final String namespace, final ApolloProperties props); String getValue(final String key); void persist(final String key, final String value); void remove(final String key);  }
@Test public void getValue() { apolloOpenApiWrapper.getValue("test.children.0"); verify(client).getItem(ApolloPropertyKey.APP_ID.getDefaultValue(), ApolloPropertyKey.ENV.getDefaultValue(), ApolloPropertyKey.CLUSTER_NAME.getDefaultValue(), NAME_SPACE, "test.children.0"); }
@Test public void getValueNotNull() { when(client.getItem(ApolloPropertyKey.APP_ID.getDefaultValue(), ApolloPropertyKey.ENV.getDefaultValue(), ApolloPropertyKey.CLUSTER_NAME.getDefaultValue(), NAME_SPACE, "test.children.0")).thenReturn(openItemDTO); assertNull(apolloOpenApiWrapper.getValue("test.children.0")); }