Skip to content

Conversation

@devin-ai-integration
Copy link

Ticket

EB-8: Update test code for deprecated test annotations

Summary

This PR documents a critical blocker for ticket EB-8. After comprehensive investigation across all branches, I've determined that @MockBean and @SpyBean are NOT deprecated in Spring Boot 3.3.3. These annotations only become deprecated in Spring Boot 3.4.0+, and the replacement annotations do not exist in the current version.

Investigation Results

Comprehensive Search Performed

  • ✅ Searched main branch (DevOps)
  • ✅ Searched all test coverage branches
  • ✅ Examined git history for annotation changes
  • ✅ Checked build artifacts

Key Findings

Current State:

  • Spring Boot Version: 3.3.3
  • @MockBean Status: NOT deprecated
  • @SpyBean Status: NOT deprecated

Required for Implementation:

  • Spring Boot Version: 3.4.0+
  • New annotations: @MockitoBean, @MockitoSpyBean (only available in 3.4+)
  • Package: org.springframework.test.context.bean.override.mockito (doesn't exist in 3.3.3)

Annotation Locations Found

Branch File Annotation Count
devin/1759413280-expand-test-coverage src/test/java/com/example/bankapp/controller/BankControllerTest.java @MockBean 1
devin/1759408856-mba-307-controller-tests src/test/java/com/example/bankapp/controller/BankControllerTest.java @MockBean 1

Blocker Status

This ticket is BLOCKED and cannot proceed until:

  • EB-1: Spring Boot 3.4.9 Upgrade is completed

Why This Is Blocked

  1. No Deprecation: The annotations to replace are not deprecated in Spring Boot 3.3.3
  2. No Replacement: The new @MockitoBean and @MockitoSpyBean annotations don't exist in 3.3.3
  3. Compilation Failure: Attempting to use the new annotations results in:
    package org.springframework.test.context.bean.override.mockito does not exist
    
  4. Clean Migration Path: Waiting for 3.4+ upgrade ensures proper support

Documentation Added

This PR adds comprehensive blocker analysis documentation:

  • File: EB-8-BLOCKER-ANALYSIS.md
  • Contents:
    • Complete investigation methodology and results
    • Technical context on Spring Boot 3.4 bean override framework
    • Dependency chain visualization
    • Post-EB-1 action items
    • Migration patterns for future reference

Recommendation

Immediate Actions:

  1. Mark ticket EB-8 as BLOCKED
  2. Add dependency on ticket EB-1 (Spring Boot 3.4.9 upgrade)
  3. Revisit this ticket after EB-1 completion

Post-EB-1 Actions:

  1. Verify Spring Boot version is 3.4.0+
  2. Check for deprecation warnings
  3. Perform annotation replacement
  4. Estimated effort: ~30 minutes (2 story points)

Testing

  • ✅ Current build compiles successfully with existing @MockBean annotations
  • ✅ No deprecation warnings present in Spring Boot 3.3.3
  • ✅ Documentation is comprehensive and actionable

Related Issues

  • Depends on: EB-1 (Spring Boot 3.4.9 Upgrade)
  • Ticket: EB-8

Link to Devin run: https://app.devin.ai/sessions/1e8f2f80a7654994805031082093fdc6
Requested by: Alex Peng (alex.peng@windsurf.com) / @alexjpeng

This ticket is BLOCKED until Spring Boot 3.4+ upgrade (EB-1) is completed.

Key Findings:
- @MockBean and @SpyBean are NOT deprecated in Spring Boot 3.3.3
- These annotations only become deprecated in Spring Boot 3.4.0+
- Replacement annotations (@MockitoBean, @MockitoSpyBean) only exist in 3.4.0+
- The org.springframework.test.context.bean.override.mockito package does not exist in 3.3.3

Investigation Results:
- Found 1 instance of @MockBean in devin/1759413280-expand-test-coverage branch
- Located in: src/test/java/com/example/bankapp/controller/BankControllerTest.java
- Current usage is valid and non-deprecated

Recommendation:
- Mark ticket EB-8 as BLOCKED
- Add dependency on EB-1 (Spring Boot 3.4.9 upgrade)
- Revisit this ticket after EB-1 completion

Ticket: EB-8
Co-Authored-By: Alex Peng <alexander.j.peng@gmail.com>
@devin-ai-integration
Copy link
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant