StatefulSetDiff extends AbstractResourceDiff { @Override public boolean isEmpty() { return isEmpty; } StatefulSetDiff(StatefulSet current, StatefulSet desired); @Override boolean isEmpty(); boolean changesVolumeClaimTemplates(); boolean changesVolumeSize(); boolean changesSpecTemplate(); boolean changesLabels(); boolean changesSpecReplicas();  }
@Test public void testCpuResources() { assertThat(testCpuResources( new ResourceRequirementsBuilder() .addToRequests(singletonMap("cpu", new Quantity("1000m"))) .addToRequests(singletonMap("memory", new Quantity("1.1Gi"))) .addToLimits(singletonMap("cpu", new Quantity("1000m"))) .addToLimits(singletonMap("memory", new Quantity("500Mi"))) .build(), new ResourceRequirementsBuilder() .addToRequests(singletonMap("cpu", new Quantity("1"))) .addToRequests(singletonMap("memory", new Quantity("1181116006"))) .addToLimits(singletonMap("cpu", new Quantity("1"))) .addToLimits(singletonMap("memory", new Quantity("524288000"))) .build()).isEmpty(), is(true)); assertThat(testCpuResources( new ResourceRequirementsBuilder() .addToRequests(singletonMap("cpu", new Quantity("1001m"))) .build(), new ResourceRequirementsBuilder() .addToRequests(singletonMap("cpu", new Quantity("1"))) .build()).isEmpty(), is(false)); assertThat(testCpuResources( new ResourceRequirementsBuilder() .addToRequests(singletonMap("memory", new Quantity("1.1Gi"))) .build(), new ResourceRequirementsBuilder() .addToRequests(singletonMap("memory", new Quantity("1181116007"))) .build()).isEmpty(), is(false)); assertThat(testCpuResources( new ResourceRequirementsBuilder() .build(), new ResourceRequirementsBuilder() .addToRequests(singletonMap("memory", new Quantity("1181116007"))) .build()).isEmpty(), is(false)); assertThat(testCpuResources( new ResourceRequirementsBuilder() .build(), new ResourceRequirementsBuilder() .build()).isEmpty(), is(true)); assertThat(testCpuResources( new ResourceRequirementsBuilder() .build(), null).isEmpty(), is(true)); }