### Question:
MappingInformation implements Comparable<MappingInformation> { boolean isValid() { return getQueueNames().size() > 0 && visibilityTimeout > MIN_EXECUTION_TIME + DELTA_BETWEEN_RE_ENQUEUE_TIME; }  @Override String toString(); @Override int compareTo(MappingInformation o);  }### Answer:
@Test public void isValidNoQueue() { MappingInformation mappingInformation = MappingInformation.builder().active(true).queueNames(Collections.emptySet()).build(); assertFalse(mappingInformation.isValid()); }
@Test public void isValidInvalidVisibilityTimeout() { MappingInformation mappingInformation = MappingInformation.builder() .active(true) .queueNames(Collections.emptySet()) .visibilityTimeout(100) .build(); assertFalse(mappingInformation.isValid()); }
@Test public void isValid() { MappingInformation mappingInformation = MappingInformation.builder() .active(true) .queueNames(Collections.singleton("test")) .visibilityTimeout(1101) .build(); assertTrue(mappingInformation.isValid()); }