COOPR-550: improve ClusterDetailsCode logic and change test logic