class CapacityGroupPodResourcePoolResolver implements PodResourcePoolResolver {

    @Override
    public List<ResourcePoolAssignment> resolve(Job<?> job) {
        ApplicationSLA capacityGroup = JobManagerUtil.getCapacityGroupDescriptor(job.getJobDescriptor(), capacityGroupService);
        if (capacityGroup == null) {
            return Collections.emptyList();
        }

        List<Pair<String, Pattern>> currentMappers = getCurrentMappers();
        for (Pair<String, Pattern> next : currentMappers) {
            Pattern pattern = next.getRight();
            if (pattern.matcher(capacityGroup.getAppName()).matches()) {
                return Collections.singletonList(ResourcePoolAssignment.newBuilder()
                        .withResourcePoolName(next.getLeft())
                        .withRule(String.format("Capacity group %s matches %s", capacityGroup.getAppName(), pattern.toString()))
                        .build()
                );
            }
        }

        return Collections.emptyList();
    }

    public  CapacityGroupPodResourcePoolResolver(DirectKubeConfiguration configuration,
                                                Config config,
                                                ApplicationSlaManagementService capacityGroupService,
                                                TitusRuntime titusRuntime);

}