### Question:
SystemSettingController { @ResponseStatus(HttpStatus.OK) @RequestMapping(value = "/datapersistenttime", method = RequestMethod.GET) public Long getExpiredTimeRange() { long expiredTimeRange = 0l; String expiredTimeRangeValue = template.opsForValue().get(EventMessageUtil.EXPIREDTIMERANGE); if(expiredTimeRangeValue != null) { expiredTimeRange = Long.valueOf(expiredTimeRangeValue); }else { expiredTimeRange = FlowgateConstant.DEFAULTEXPIREDTIMERANGE; } return expiredTimeRange; }  @ResponseStatus(HttpStatus.OK) @RequestMapping(value = "/datapersistenttime", method = RequestMethod.GET) Long getExpiredTimeRange(); @ResponseStatus(HttpStatus.OK) @RequestMapping(value = "/datapersistenttime/{time}", method = RequestMethod.PUT) void updateExpiredTimeRange(@PathVariable("time") Long time);  }### Answer:
@Test public void getExpiredTimeRangeTest() { ValueOperations<String, String> valueOperations = Mockito.mock(ValueOperations.class); Mockito.doReturn(valueOperations).when(template).opsForValue(); try { this.mockMvc.perform(get("/v1/setting/datapersistenttime")) .andExpect(status().isOk()).andDo(document("SystemSetting-getExpiredTimeRange-example" )) .andReturn(); } catch (Exception e) { TestCase.fail(); } }