FullstopApi { @ApiOperation(value = "Put instance log in S3", notes = "Add log for instance in S3") @ApiResponses(value = {@ApiResponse(code = 201, message = "Logs saved successfully")}) @RequestMapping(value = "/instance-logs", method = RequestMethod.POST) public ResponseEntity<Void> instanceLogs(@ApiParam(value = "", required = true) @RequestBody final LogObj log) { saveLog(log); return new ResponseEntity<>(CREATED); }  @ApiOperation(value = "Put instance log in S3", notes = "Add log for instance in S3") @ApiResponses(value = {@ApiResponse(code = 201, message = "Logs saved successfully")}) @RequestMapping(value = "/instance-logs", method = RequestMethod.POST) ResponseEntity<Void> instanceLogs(@ApiParam(value = "", required = true) @RequestBody final LogObj log);  }
@Test public void testInstanceLogs() throws Exception { when( mockApplicationLifecycleService.saveInstanceLogLifecycle( any(), any(), any(), any(), any(), any())).thenReturn(new LifecycleEntity()); final byte[] bytes = objectMapper.writeValueAsBytes(logObjRequest); this.mockMvc.perform( post("/api/instance-logs").contentType(APPLICATION_JSON).content(bytes)) .andExpect(status().isCreated()); verify(mockApplicationLifecycleService).saveInstanceLogLifecycle(any(), any(), any(), any(), any(), any()); }