### Question:
RestBackendImpl implements RestBackend { @Override public boolean isDomainUid(String domainUid) { return getDomain(domainUid).isPresent(); } 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 validateKnownUid() { assertThat(restBackend.isDomainUid(NAME2), is(true)); }
@Test public void rejectUnknownUid() { assertThat(restBackend.isDomainUid("no_such_uid"), is(false)); }