@Test
public void testInstanceTypeAffinity() {

    Pair<V1Affinity, Map<String, String>> affinityWithAnnotations = factory.buildV1Affinity(
            newJobWithHardConstraint(JobConstraints.MACHINE_TYPE.toUpperCase(), "r5.metal"), JobGenerator.oneBatchTask()
    );
    V1NodeSelector nodeSelector = affinityWithAnnotations.getLeft().getNodeAffinity().getRequiredDuringSchedulingIgnoredDuringExecution();
    assertThat(nodeSelector.getNodeSelectorTerms()).hasSize(1);
}