### Question:
RestBackendImpl implements RestBackend { WlsDomainConfig getWlsDomainConfig(String domainUid) { for (String ns : targetNamespaces) { WlsDomainConfig config = INSTANCE.getWlsDomainConfig(ns, domainUid); if (config != null) { return config; } } return new WlsDomainConfig(null); } RestBackendImpl(String principal, String accessToken, Collection<String> targetNamespaces); @Override Set<String> getDomainUids(); @Override boolean isDomainUid(String domainUid); @Override void performDomainAction(String domainUid, DomainAction params); @Override Set<String> getClusters(String domainUid); @Override boolean isCluster(String domainUid, String cluster); @Override void scaleCluster(String domainUid, String cluster, int managedServerCount); static final String INITIAL_VERSION; }### Answer:
@Test public void verify_getWlsDomainConfig_returnsWlsDomainConfig() { WlsDomainConfig wlsDomainConfig = ((RestBackendImpl) restBackend).getWlsDomainConfig(NAME1); assertThat(wlsDomainConfig.getName(), equalTo(NAME1)); }
@Test public void verify_getWlsDomainConfig_doesNotReturnNull_whenNoSuchDomainUid() { WlsDomainConfig wlsDomainConfig = ((RestBackendImpl) restBackend).getWlsDomainConfig("NoSuchDomainUID"); assertThat(wlsDomainConfig, notNullValue()); }
@Test public void verify_getWlsDomainConfig_doesNotReturnNull_whenScanIsNull() { config = null; WlsDomainConfig wlsDomainConfig = ((RestBackendImpl) restBackend).getWlsDomainConfig(NAME1); assertThat(wlsDomainConfig, notNullValue()); }