test_class.declarator: CREATION_TIME = TestDateUtil.CURRENT_TIMESTAMP
test_class.modifier: private static final
test_class.original_string: private static final String CREATION_TIME = TestDateUtil.CURRENT_TIMESTAMP;
test_class.type: String
test_class.var_name: CREATION_TIME
test_class.declarator: DESCRIPTION = "description"
test_class.modifier: private static final
test_class.original_string: private static final String DESCRIPTION = "description";
test_class.type: String
test_class.var_name: DESCRIPTION
test_class.declarator: ID = 1L
test_class.modifier: private static final
test_class.original_string: private static final Long ID = 1L;
test_class.type: Long
test_class.var_name: ID
test_class.declarator: MODIFICATION_TIME = TestDateUtil.CURRENT_TIMESTAMP
test_class.modifier: private static final
test_class.original_string: private static final String MODIFICATION_TIME = TestDateUtil.CURRENT_TIMESTAMP;
test_class.type: String
test_class.var_name: MODIFICATION_TIME
test_class.declarator: TITLE = "title"
test_class.modifier: private static final
test_class.original_string: private static final String TITLE = "title";
test_class.type: String
test_class.var_name: TITLE
test_class.declarator: SEARCH_TERM = "IT"
test_class.modifier: private static final
test_class.original_string: private static final String SEARCH_TERM = "IT";
test_class.type: String
test_class.var_name: SEARCH_TERM
test_class.declarator: PAGE_NUMBER = 0
test_class.modifier: private static final
test_class.original_string: private static final int PAGE_NUMBER = 0;
test_class.type: int
test_class.var_name: PAGE_NUMBER
test_class.declarator: PAGE_NUMBER_STRING = PAGE_NUMBER + ""
test_class.modifier: private static final
test_class.original_string: private static final String PAGE_NUMBER_STRING = PAGE_NUMBER + "";
test_class.type: String
test_class.var_name: PAGE_NUMBER_STRING
test_class.declarator: PAGE_SIZE = 10
test_class.modifier: private static final
test_class.original_string: private static final int PAGE_SIZE = 10;
test_class.type: int
test_class.var_name: PAGE_SIZE
test_class.declarator: PAGE_SIZE_STRING = PAGE_SIZE + ""
test_class.modifier: private static final
test_class.original_string: private static final String PAGE_SIZE_STRING = PAGE_SIZE + "";
test_class.type: String
test_class.var_name: PAGE_SIZE_STRING
test_class.declarator: SORT_FIELD = "id"
test_class.modifier: private static final
test_class.original_string: private static final String SORT_FIELD = "id";
test_class.type: String
test_class.var_name: SORT_FIELD
test_class.declarator: SORT_ORDER = "DESC"
test_class.modifier: private static final
test_class.original_string: private static final String SORT_ORDER = "DESC";
test_class.type: String
test_class.var_name: SORT_ORDER
test_class.declarator: TOTAL_NUMBER_OF_ITEMS = 1L
test_class.modifier: private static final
test_class.original_string: private static final long TOTAL_NUMBER_OF_ITEMS = 1L;
test_class.type: long
test_class.var_name: TOTAL_NUMBER_OF_ITEMS
test_class.declarator: ONE_ITEM_FOUND = 1
test_class.modifier: private static final
test_class.original_string: private static final int ONE_ITEM_FOUND = 1;
test_class.type: int
test_class.var_name: ONE_ITEM_FOUND
test_class.declarator: ONE_PAGE_FOUND = 1
test_class.modifier: private static final
test_class.original_string: private static final int ONE_PAGE_FOUND = 1;
test_class.type: int
test_class.var_name: ONE_PAGE_FOUND
test_class.declarator: ZERO_ITEMS_FOUND = 0
test_class.modifier: private static final
test_class.original_string: private static final int ZERO_ITEMS_FOUND = 0;
test_class.type: int
test_class.var_name: ZERO_ITEMS_FOUND
test_class.declarator: ZERO_PAGES_FOUND = 0
test_class.modifier: private static final
test_class.original_string: private static final int ZERO_PAGES_FOUND = 0;
test_class.type: int
test_class.var_name: ZERO_PAGES_FOUND
test_class.declarator: mockMvc
test_class.modifier: private
test_class.original_string: private MockMvc mockMvc;
test_class.type: MockMvc
test_class.var_name: mockMvc
test_class.declarator: objectMapper
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private ObjectMapper objectMapper;
test_class.type: ObjectMapper
test_class.var_name: objectMapper
test_class.declarator: todoCrudServiceMock
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private TodoCrudService todoCrudServiceMock;
test_class.type: TodoCrudService
test_class.var_name: todoCrudServiceMock
test_class.declarator: todoSearchServiceMock
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private TodoSearchService todoSearchServiceMock;
test_class.type: TodoSearchService
test_class.var_name: todoSearchServiceMock
test_class.declarator: webAppContext
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private WebApplicationContext webAppContext;
test_class.type: WebApplicationContext
test_class.var_name: webAppContext
test_class.file: jooq-only/src/test/java/net/petrikainulainen/spring/jooq/todo/controller/TodoControllerTest.java
test_class.identifier: TodoControllerTest
test_case.body: @Test
      public void findAll_NoTodoEntriesFound_ShouldReturnEmptyListAsJSonDocument() throws Exception {
          when(todoCrudServiceMock.findAll()).thenReturn(new ArrayList<TodoDTO>());
  
          mockMvc.perform(get("/api/todo"))
                  .andExpect(status().isOk())
                  .andExpect(content().contentType(WebTestConstants.APPLICATION_JSON_UTF8))
                  .andExpect(jsonPath("$", hasSize(0)));
  
          verify(todoCrudServiceMock, times(1)).findAll();
          verifyNoMoreInteractions(todoCrudServiceMock);
          verifyZeroInteractions(todoSearchServiceMock);
      }
test_case.class_method_signature: TodoControllerTest.findAll_NoTodoEntriesFound_ShouldReturnEmptyListAsJSonDocument()
test_case.full_signature: @Test public void findAll_NoTodoEntriesFound_ShouldReturnEmptyListAsJSonDocument()
test_case.identifier: findAll_NoTodoEntriesFound_ShouldReturnEmptyListAsJSonDocument
test_case.invocations: thenReturn when findAll andExpect andExpect andExpect perform get isOk status contentType content jsonPath hasSize findAll verify times verifyNoMoreInteractions verifyZeroInteractions
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void findAll_NoTodoEntriesFound_ShouldReturnEmptyListAsJSonDocument()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(TodoController.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(TodoController.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: crudService
focal_class.modifier: private final
focal_class.original_string: private final TodoCrudService crudService;
focal_class.type: TodoCrudService
focal_class.var_name: crudService
focal_class.declarator: searchService
focal_class.modifier: private final
focal_class.original_string: private final TodoSearchService searchService;
focal_class.type: TodoSearchService
focal_class.var_name: searchService
focal_class.file: jooq-only/src/main/java/net/petrikainulainen/spring/jooq/todo/controller/TodoController.java
focal_class.identifier: TodoController
focal_class.class_method_signature: TodoController.TodoController(TodoCrudService crudService, TodoSearchService searchService)
focal_class.full_signature: @Autowired public  TodoController(TodoCrudService crudService, TodoSearchService searchService)
focal_class.identifier: TodoController
focal_class.modifiers: @Autowired public
focal_class.parameters: (TodoCrudService crudService, TodoSearchService searchService)
focal_class.signature:  TodoController(TodoCrudService crudService, TodoSearchService searchService)
focal_class.class_method_signature: TodoController.add(@RequestBody @Valid TodoDTO dto)
focal_class.full_signature: @RequestMapping(method = RequestMethod.POST) @ResponseStatus(HttpStatus.CREATED) public TodoDTO add(@RequestBody @Valid TodoDTO dto)
focal_class.identifier: add
focal_class.modifiers: @RequestMapping(method = RequestMethod.POST) @ResponseStatus(HttpStatus.CREATED) public
focal_class.parameters: (@RequestBody @Valid TodoDTO dto)
focal_class.return: TodoDTO
focal_class.signature: TodoDTO add(@RequestBody @Valid TodoDTO dto)
focal_class.class_method_signature: TodoController.delete(@PathVariable("id") Long id)
focal_class.full_signature: @RequestMapping(value = "/{id}", method = RequestMethod.DELETE) public TodoDTO delete(@PathVariable("id") Long id)
focal_class.identifier: delete
focal_class.modifiers: @RequestMapping(value = "/{id}", method = RequestMethod.DELETE) public
focal_class.parameters: (@PathVariable("id") Long id)
focal_class.return: TodoDTO
focal_class.signature: TodoDTO delete(@PathVariable("id") Long id)
focal_class.class_method_signature: TodoController.findAll()
focal_class.full_signature: @RequestMapping(method = RequestMethod.GET) public List<TodoDTO> findAll()
focal_class.identifier: findAll
focal_class.modifiers: @RequestMapping(method = RequestMethod.GET) public
focal_class.parameters: ()
focal_class.return: List<TodoDTO>
focal_class.signature: List<TodoDTO> findAll()
focal_class.class_method_signature: TodoController.findById(@PathVariable("id") Long id)
focal_class.full_signature: @RequestMapping(value = "/{id}", method = RequestMethod.GET) public TodoDTO findById(@PathVariable("id") Long id)
focal_class.identifier: findById
focal_class.modifiers: @RequestMapping(value = "/{id}", method = RequestMethod.GET) public
focal_class.parameters: (@PathVariable("id") Long id)
focal_class.return: TodoDTO
focal_class.signature: TodoDTO findById(@PathVariable("id") Long id)
focal_class.class_method_signature: TodoController.findBySearchTerm(@RequestParam("searchTerm") String searchTerm, Pageable pageable)
focal_class.full_signature: @RequestMapping(value = "/search", method = RequestMethod.GET) public Page<TodoDTO> findBySearchTerm(@RequestParam("searchTerm") String searchTerm, Pageable pageable)
focal_class.identifier: findBySearchTerm
focal_class.modifiers: @RequestMapping(value = "/search", method = RequestMethod.GET) public
focal_class.parameters: (@RequestParam("searchTerm") String searchTerm, Pageable pageable)
focal_class.return: Page<TodoDTO>
focal_class.signature: Page<TodoDTO> findBySearchTerm(@RequestParam("searchTerm") String searchTerm, Pageable pageable)
focal_class.class_method_signature: TodoController.update(@PathVariable("id") Long id, @RequestBody @Valid TodoDTO dto)
focal_class.full_signature: @RequestMapping(value = "/{id}", method = RequestMethod.PUT) public TodoDTO update(@PathVariable("id") Long id, @RequestBody @Valid TodoDTO dto)
focal_class.identifier: update
focal_class.modifiers: @RequestMapping(value = "/{id}", method = RequestMethod.PUT) public
focal_class.parameters: (@PathVariable("id") Long id, @RequestBody @Valid TodoDTO dto)
focal_class.return: TodoDTO
focal_class.signature: TodoDTO update(@PathVariable("id") Long id, @RequestBody @Valid TodoDTO dto)
focal_method.body: @RequestMapping(method = RequestMethod.GET)
      public List<TodoDTO> findAll() {
          LOGGER.info("Finding all todo entries");
  
          List<TodoDTO> todoEntries = crudService.findAll();
  
          LOGGER.info("Found {} todo entries.");
  
          return todoEntries;
      }
focal_method.class_method_signature: TodoController.findAll()
focal_method.full_signature: @RequestMapping(method = RequestMethod.GET) public List<TodoDTO> findAll()
focal_method.identifier: findAll
focal_method.invocations: info findAll info
focal_method.modifiers: @RequestMapping(method = RequestMethod.GET) public
focal_method.parameters: ()
focal_method.return: List<TodoDTO>
focal_method.signature: List<TodoDTO> findAll()