{"id":20365026,"url":"https://github.com/h3ar7b3a7/springproducertests","last_synced_at":"2026-05-01T22:35:25.622Z","repository":{"id":136744885,"uuid":"309615770","full_name":"H3AR7B3A7/SpringProducerTests","owner":"H3AR7B3A7","description":"A small example of a reactive web producer with tests and reactive mongo db.","archived":false,"fork":false,"pushed_at":"2020-11-04T14:35:05.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-04T18:46:42.264Z","etag":null,"topics":["contract-testing","maven","mockito","mongo-atlas","mongodb","reactive-mongo","reactive-spring","testing"],"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/H3AR7B3A7.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":"2020-11-03T08:07:33.000Z","updated_at":"2020-11-08T13:37:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"f4510fa1-6463-4f23-af29-39870c7c6d38","html_url":"https://github.com/H3AR7B3A7/SpringProducerTests","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/H3AR7B3A7/SpringProducerTests","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/H3AR7B3A7%2FSpringProducerTests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/H3AR7B3A7%2FSpringProducerTests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/H3AR7B3A7%2FSpringProducerTests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/H3AR7B3A7%2FSpringProducerTests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/H3AR7B3A7","download_url":"https://codeload.github.com/H3AR7B3A7/SpringProducerTests/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/H3AR7B3A7%2FSpringProducerTests/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32515838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["contract-testing","maven","mockito","mongo-atlas","mongodb","reactive-mongo","reactive-spring","testing"],"created_at":"2024-11-15T00:15:00.657Z","updated_at":"2026-05-01T22:35:25.602Z","avatar_url":"https://github.com/H3AR7B3A7.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reactive web\nProducer -\u003e Consumer  \nRESTful web service with Spring WebFlux that gets consumed by service with a WebClient.  \nSee the [SpringConsumerTests](https://github.com/H3AR7B3A7/SpringConsumerTests) for the consumer side.\n\n# Testing\nObject \u003c\u003e Entity \u003c\u003e Controller \u003c\u003e Service \u003c\u003e Repository \u003c\u003e Api / UI\n\n### Strategy\n- Inside out testing : Left to right\n- Outside in testing : Right to Left ( - for more difficult integrations)\n\n### Red - Green refactoring\n- Build a test\n- Write the code to satisfy the test\n- Repeat\n\n## Mockito\nMockito is an open source testing framework for Java. It allows the creation of test double objects (mock objects) in automated unit tests for the purpose of test-driven development.\n\n## Spring cloud contract\nWhen using wiremock to mock producer data there is no way to tell if there are fields that no longer exist in the api you consume data from.\nTo detect this we can use a contract that defines a relation you expect to exist.\n\n# Mongo\n\n[Mongo Docs](https://docs.spring.io/spring-data/mongodb/docs/current/reference/html/#reference)\n\n### Atlas\napplication.properties:\n\n    spring.data.mongodb.uri= \u003cUri provided by atlas\u003e\n    spring.data.mongodb.database= \u003cDatabase name\u003e\n    \n### Local daemon\napplication.properties:\n\n    spring.data.mongodb.host=localhost\n    spring.data.mongodb.port=27017\n    spring.data.mongodb.database= \u003cDatabase name\u003e\n    \n---\n[CLI Cheat Sheet](https://gist.github.com/bradtraversy/f407d642bdc3b31681bc7e56d95485b6)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh3ar7b3a7%2Fspringproducertests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fh3ar7b3a7%2Fspringproducertests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh3ar7b3a7%2Fspringproducertests/lists"}