TieredQueueSlas implements TaskQueueSla { Map<Integer, TierSla> getSlas() { return slas; } TieredQueueSlas(Map<Integer, ResAllocs> tierCapacities, Map<Integer, Map<String, ResAllocs>> slas);   }
@Test public void testSlas() throws Exception { Map<Integer, TierSla> slas = new TieredQueueSlas(generator.getTierCapacities(), generator.getBucketCapacities()).getSlas(); assertThat(slas.size(), is(equalTo(1))); TierSla tier0Sla = slas.get(0); assertThat(hasEqualResources(tier0Sla.getTierCapacity(), createResAllocs(8)), is(true)); assertThat(hasEqualResources(tier0Sla.getBucketAllocs(BUCKET_0), createResAllocs(4)), is(true)); assertThat(tier0Sla.evalAllocationShare(BUCKET_0), is(equalTo(0.5))); }