OpenShiftStopWorkspaceRoleProvisioner { protected OpenshiftRoleBinding createStopWorkspacesRoleBinding(String projectName) { return new OpenshiftRoleBindingBuilder() .withNewMetadata() .withName("che-workspace-stop") .withNamespace(projectName) .endMetadata() .withNewRoleRef() .withName("workspace-stop") .withNamespace(projectName) .endRoleRef() .withSubjects( new ObjectReferenceBuilder() .withKind("ServiceAccount") .withName("che") .withNamespace(installationLocation) .build()) .build(); } @Inject  OpenShiftStopWorkspaceRoleProvisioner(
      OpenShiftClientFactory clientFactory,
      CheInstallationLocation installationLocation,
      @Named("che.workspace.stop.role.enabled") boolean stopWorkspaceRoleEnabled); void provision(String projectName);  }
@Test public void shouldCreateRoleBinding() throws InfrastructureException { when(cheInstallationLocation.getInstallationLocationNamespace()).thenReturn("che"); assertEquals( stopWorkspaceRoleProvisioner.createStopWorkspacesRoleBinding("developer-che"), expectedRoleBinding); }