### Question:
ServicePolicy extends AuthPolicy { public List<TimeFence> getTimeFences() { return timeFences; } ServicePolicy(Integer any, Boolean inherence, Boolean knowledge, Boolean possession, Boolean deviceIntegrity); @JsonCreator  ServicePolicy(@JsonProperty("minimum_requirements") List<MinimumRequirement> minimumRequirements,
                         @JsonProperty("factors") ArrayNode factors); void addTimeFence(TimeFence timeFence); List<TimeFence> getTimeFences(); @Override List<Map<String, Object>> getFactors(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void getTimeFences() throws Exception { List<TimeFence> expected = Arrays.asList(mock(TimeFence.class), mock(TimeFence.class)); ServicePolicy policy = new ServicePolicy(0, false, false, false, false); policy.addTimeFence(expected.get(0)); policy.addTimeFence(expected.get(1)); assertEquals(expected, policy.getTimeFences()); }