### Question:
AutoScalingPluginHandler implements ManifestHandler { @Override public List<ManifestSnippet> handle(ServiceSpec serviceSpec, ManifestContext manifestContext) throws HyscaleException { Object podSpecOwner = manifestContext.getGenerationAttribute(ManifestGenConstants.POD_SPEC_OWNER); if (!ManifestPredicates.isAutoScalingEnabledWithPrint().test(serviceSpec, true) || !(ManifestResource.STATEFUL_SET.getKind().equals(podSpecOwner) || ManifestResource.DEPLOYMENT.getKind().equals(podSpecOwner))) { logger.debug("Skipping AutoScaling handler"); return Collections.emptyList(); } Replicas replicas = serviceSpec.get(HyscaleSpecFields.replicas, Replicas.class); if (replicas == null) { logger.debug("Cannot handle replicas as the field is not declared"); return Collections.emptyList(); } ConfigTemplate hpaTemplate = templateProvider.get(PluginTemplateProvider.PluginTemplateType.HPA); if (hpaTemplate == null) { WorkflowLogger.persist(ManifestGeneratorActivity.FAILED_TO_PROCESS_REPLICAS); return Collections.emptyList(); } String yamlString = templateResolver.resolveTemplate(hpaTemplate.getTemplatePath(), getContext(replicas, serviceSpec, manifestContext)); ManifestSnippet snippet = new ManifestSnippet(); snippet.setKind(ManifestResource.HORIZONTAL_POD_AUTOSCALER.getKind()); snippet.setPath("spec"); snippet.setSnippet(yamlString); List<ManifestSnippet> snippetList = new LinkedList<>(); snippetList.add(snippet); return snippetList; }  @Override List<ManifestSnippet> handle(ServiceSpec serviceSpec, ManifestContext manifestContext);  }### Answer:
@Test void autoScalingEnabled() { try { List<ManifestSnippet> manifestList = autoScalingPluginHandler.handle(scalingEnabledSpec, ManifestContextTestUtil.getManifestContext(ManifestResource.STATEFUL_SET)); if (manifestList == null || manifestList.isEmpty()) { fail("HorizontalPodAutoscaler manifest required"); } } catch (HyscaleException e) { fail(e); } }