### Question:
RequireAemImpl implements RequireAem { @Override public Distribution getDistribution() { if (productInfo.getVersion().compareTo(originalCloudServiceVersion) > 0) { return Distribution.CLOUD_READY; } else { return Distribution.CLASSIC; } }  @Override Distribution getDistribution();  }### Answer:
@Test public void isCloudReady_True() { setUpAsCloudReady(); RequireAem requireAem = ctx.getService(RequireAem.class); assertEquals(RequireAem.Distribution.CLOUD_READY, requireAem.getDistribution()); }
@Test public void isCloudReady_False() { setUpAsNotCloudReady(); RequireAem requireAem = ctx.getService(RequireAem.class); assertEquals(RequireAem.Distribution.CLASSIC, requireAem.getDistribution()); }
@Test public void referenceFilter_CloudReady_True_Satisfied() { setUpAsCloudReady(); RequireAem[] requireAems = ctx.getServices(RequireAem.class, "(distribution=cloud-ready)"); assertEquals(1, requireAems.length); assertEquals(RequireAem.Distribution.CLOUD_READY, requireAems[0].getDistribution()); }
@Test public void referenceFilter_CloudReady_False_Satisfied() { setUpAsNotCloudReady(); RequireAem[] requireAems = ctx.getServices(RequireAem.class, "(distribution=classic)"); assertEquals(1, requireAems.length); assertEquals(RequireAem.Distribution.CLASSIC, requireAems[0].getDistribution()); }