NamespaceBranchService { public Namespace findBranch(String appId, String parentClusterName, String namespaceName) { return namespaceService.findChildNamespace(appId, parentClusterName, namespaceName); } NamespaceBranchService(
      final AuditService auditService,
      final GrayReleaseRuleRepository grayReleaseRuleRepository,
      final ClusterService clusterService,
      final @Lazy ReleaseService releaseService,
      final NamespaceService namespaceService,
      final ReleaseHistoryService releaseHistoryService); @Transactional Namespace createBranch(String appId, String parentClusterName, String namespaceName, String operator); Namespace findBranch(String appId, String parentClusterName, String namespaceName); GrayReleaseRule findBranchGrayRules(String appId, String clusterName, String namespaceName,
                                             String branchName); @Transactional void updateBranchGrayRules(String appId, String clusterName, String namespaceName,
                                    String branchName, GrayReleaseRule newRules); @Transactional GrayReleaseRule updateRulesReleaseId(String appId, String clusterName,
                                   String namespaceName, String branchName,
                                   long latestReleaseId, String operator); @Transactional void deleteBranch(String appId, String clusterName, String namespaceName,
                           String branchName, int branchStatus, String operator);  }
@Test @Sql(scripts = "/sql/namespace-branch-test.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) @Sql(scripts = "/sql/clean.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) public void testFindBranch() { Namespace branch = namespaceBranchService.findBranch(testApp, testCluster, testNamespace); Assert.assertNotNull(branch); Assert.assertEquals(testBranchName, branch.getClusterName()); }