[Enhancement] SendMessageRequestHeader, SendMessageBatchRequestHeader and SendMessageBatchV2RequestHeader have almost same body
- Dominant language
- Java
- Stars
- 1.8k
- Forks
- 658
- Avg merge
- 11h 29m
- Merged PRs (30d)
- 52
Description
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/eventmesh/issues?q=is%3Aissue) and found no similar issues.
### Enhancement Request
* SendMessageRequestHeader, SendMessageBatchRequestHeader and SendMessageBatchV2RequestHeader have almost same body.
* `Assert.assertThat()` is deprecated in junit.
* There is a more convenient method of initializing Map.
### Describe the solution you'd like
* Abstract `SendMessageRequestHeader`, `SendMessageBatchRequestHeader` and `SendMessageBatchV2RequestHeader` these three classes.
* Use other api of junit.
* Use `ImmutableMap.of()` to create and init Map.
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
Contributor guide
Research direction
Locate SendMessageRequestHeader, SendMessageBatchRequestHeader, and SendMessageBatchV2RequestHeader and compare their shared structure first. Review the deprecated Assert.assertThat() usage and current Map initialization around these classes. Done means the shared header behavior is consolidated, the JUnit API is updated, and Map creation uses ImmutableMap.of().
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100