{"id":26179418,"url":"https://github.com/bezkoder/spring-boot-unit-test-rest-controller","last_synced_at":"2025-07-23T18:03:38.602Z","repository":{"id":101824427,"uuid":"474836390","full_name":"bezkoder/spring-boot-unit-test-rest-controller","owner":"bezkoder","description":"Spring Boot Rest API unit test with Junit 5, Mockito, Maven","archived":false,"fork":false,"pushed_at":"2023-06-04T11:50:46.000Z","size":64,"stargazers_count":42,"open_issues_count":0,"forks_count":31,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-14T22:37:03.365Z","etag":null,"topics":["junit","junit5","maven","mockito","rest-api","spring-boot","spring-boot-test","spring-test","springboot","unit-testing","webmvctest"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bezkoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-28T03:49:31.000Z","updated_at":"2025-03-31T17:14:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"f33077c2-5350-437c-bdf9-96aeebf60122","html_url":"https://github.com/bezkoder/spring-boot-unit-test-rest-controller","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bezkoder/spring-boot-unit-test-rest-controller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bezkoder%2Fspring-boot-unit-test-rest-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bezkoder%2Fspring-boot-unit-test-rest-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bezkoder%2Fspring-boot-unit-test-rest-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bezkoder%2Fspring-boot-unit-test-rest-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bezkoder","download_url":"https://codeload.github.com/bezkoder/spring-boot-unit-test-rest-controller/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bezkoder%2Fspring-boot-unit-test-rest-controller/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266726574,"owners_count":23974922,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["junit","junit5","maven","mockito","rest-api","spring-boot","spring-boot-test","spring-test","springboot","unit-testing","webmvctest"],"created_at":"2025-03-11T21:49:51.382Z","updated_at":"2025-07-23T18:03:38.545Z","avatar_url":"https://github.com/bezkoder.png","language":"Java","readme":"# Spring Boot Rest API unit testing with Junit 5, Mockito, Maven\nApply Spring Boot \u003ccode\u003e@WebMvcTest\u003c/code\u003e for Rest Controller Unit Test with JUnit 5 and Mockito.\n\nFor more detail, please visit:\n\u003e [Spring Boot Rest Controller Unit Test with @WebMvcTest](https://www.bezkoder.com/spring-boot-webmvctest/)\n\n\u003e [Spring Boot Unit Test for JPA Repository example](https://www.bezkoder.com/spring-boot-unit-test-jpa-repo-datajpatest/)\n\nThe code gives you an additional unit test for following Rest APIs example:\n\u003e [Spring Boot + H2](https://www.bezkoder.com/spring-boot-jpa-h2-example/)\n\n\u003e [Spring Boot + MySQL](https://www.bezkoder.com/spring-boot-jpa-h2-example/)\n\n\u003e [Spring Boot + PostgreSQL](https://www.bezkoder.com/spring-boot-postgresql-example/)\n\n\u003e [Spring Data + MongoDB](https://www.bezkoder.com/spring-boot-mongodb-crud/)\n\n\u003e [Spring JPA + SQL Server](https://www.bezkoder.com/spring-boot-sql-server/)\n\n\u003e [Spring JPA + Oracle](https://www.bezkoder.com/spring-boot-hibernate-oracle/)\n\n\u003e [Spring Data + Cassandra](https://www.bezkoder.com/spring-boot-cassandra-crud/)\n\nMore Practice:\n\u003e [Spring Boot Validate Request Body](https://www.bezkoder.com/spring-boot-validate-request-body/)\n\n\u003e [Spring JPA @Query example: Custom query in Spring Boot](https://www.bezkoder.com/spring-jpa-query/)\n\n\u003e [Spring JPA Native Query example in Spring Boot](https://www.bezkoder.com/jpa-native-query/)\n\n\u003e [Spring Boot File upload example with Multipart File](https://www.bezkoder.com/spring-boot-file-upload/)\n\n\u003e [Spring Boot Pagination \u0026 Filter example | Spring JPA, Pageable](https://www.bezkoder.com/spring-boot-pagination-filter-jpa-pageable/)\n\n\u003e [Spring Data JPA Sort/Order by multiple Columns | Spring Boot](https://www.bezkoder.com/spring-data-sort-multiple-columns/)\n\n\u003e Cache the result: [Spring Boot Redis Cache example](https://www.bezkoder.com/spring-boot-redis-cache-example/)\n\n\u003e Documentation: [Spring Boot with Swagger 3 example](https://www.bezkoder.com/spring-boot-swagger-3/)\n\n\u003e Reactive Rest API: [Spring Boot WebFlux example](https://www.bezkoder.com/spring-boot-webflux-rest-api/)\n\nException Handling:\n\u003e [Spring Boot @ControllerAdvice \u0026 @ExceptionHandler example](https://www.bezkoder.com/spring-boot-controlleradvice-exceptionhandler/)\n\n\u003e [@RestControllerAdvice example in Spring Boot](https://www.bezkoder.com/spring-boot-restcontrolleradvice/)\n\nAssociations:\n\u003e [Spring Boot One To One example with Spring JPA, Hibernate](https://www.bezkoder.com/jpa-one-to-one/)\n\n\u003e [Spring Boot One To Many example with Spring JPA, Hibernate](https://www.bezkoder.com/jpa-one-to-many/)\n\n\u003e [Spring Boot Many To Many example with Spring JPA, Hibernate](https://www.bezkoder.com/jpa-many-to-many/)\n\nSecurity:\n\u003e [Spring Boot + Spring Security JWT Authentication \u0026 Authorization](https://www.bezkoder.com/spring-boot-jwt-authentication/)\n\nDeployment:\n\u003e [Deploy Spring Boot App on AWS – Elastic Beanstalk](https://bezkoder.com/deploy-spring-boot-aws-eb/)\n\n\u003e [Docker Compose Spring Boot and MySQL example](https://www.bezkoder.com/docker-compose-spring-boot-mysql/)\n\nFullstack:\n\u003e [Integrate Angular with Spring Boot Rest API](https://www.bezkoder.com/integrate-angular-spring-boot/)\n\n\u003e [Integrate React with Spring Boot Rest API](https://www.bezkoder.com/integrate-reactjs-spring-boot/)\n\n\u003e [Integrate Vue with Spring Boot Rest API](https://www.bezkoder.com/integrate-vue-spring-boot/)\n\n## Run Spring Boot application\n```\nmvn test -Dtest=TutorialControllerTests\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbezkoder%2Fspring-boot-unit-test-rest-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbezkoder%2Fspring-boot-unit-test-rest-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbezkoder%2Fspring-boot-unit-test-rest-controller/lists"}