atlassian logo
Atlassian· Backend, P40

Atlassian AI-Enabled Coding Round — Spring Boot + H2 + PIN Validation

Posted
30 Oct 2026
3 reads

Summary

I participated in an AI-enabled coding round for a Backend role at Atlassian, where I had to modify a Spring Boot application to add PIN validation and handle leading zeros.

How it went

A rant before the experience: It’s frustrating to see people search LeetCode, Reddit, and other sites for interview questions, ask others for detailed experiences, and then respond with “I’m under NDA” when someone asks about their round.

Most of us encounter confidentiality obligations during interviews. I’m not asking anyone to ignore theirs, but the one-way exchange gets tiring: use the community to prepare, then offer nothing back—not even the format, stack, or unexpected difficulties.

Sometimes it feels less like confidentiality and more like people worrying that sharing will give the next candidate an easier round or a better outcome. That feeling is understandable. But if that’s the concern, I’d appreciate the honesty rather than the moral superiority around sharing interview experiences. We also can’t know everyone’s reasons or exactly what they agreed to.

If nobody contributed anything, this community wouldn’t have the preparation value we all benefit from. Knowing the general task doesn’t make an unfamiliar repository familiar, make a slow AI respond faster, or explain Spring Boot and JPA for you.

With that said, here’s the round I encountered.

Round and environment

  • Company: Atlassian
  • Role: Backend, P40
  • Round: AI-enabled coding
  • Duration: Approximately one hour
  • Platform: HackerRank
  • Stack: Java, Spring Boot, H2, and JPA
  • An existing repository and an AI assistant were provided.
  • The AI was noticeably slow during my session.

Problem: validate a card PIN

The repository contained a card model with multiple fields, a controller, and a repository backed by H2 through JPA.

There was an existing PATCH endpoint to update a card’s PIN. The requirement was to add validation:

  1. The PIN must be exactly four digits long.
  2. It must contain only numeric digits, with no letters or symbols.
  3. It must not contain any repeating digits.
  4. It must be a positive value.

“Non-repeating” meant no duplicate digit anywhere, not merely no consecutive repeats. For example, 1213 was invalid even though the repeated digits weren’t adjacent. The wording initially left room for interpretation, so this was worth clarifying.

The main catch: the existing data model

The PIN wasn’t a new field we were adding. The card model already stored a PIN as an int, and existing records already contained numeric PIN values. The controller also accepted the PIN directly as an int parameter, without a separate update-request DTO.

Leading zeros therefore required more than adding validation to the endpoint. An integer cannot preserve a PIN such as "0123"—its numeric value becomes 123.

We needed to change the PIN representation in the card model itself to String, and follow that change through the controller, service, and persistence mapping. Changing only the controller parameter would leave the underlying representation problem unresolved.

What was expected

Understand the existing request flow and implement the change across the relevant layers:

PATCH request → controller → service/validation → card model → JPA/H2 persistence

Valid input should update the intended card’s PIN while preserving leading zeros. Invalid input should be rejected without modifying the stored card or its other fields.

The change also needed verification through tests covering the validation rules, leading-zero handling, and unchanged state after rejected updates.

This was an existing Spring Boot application with JPA persistence—not a standalone validation function or a repository implemented using a Java Map.

If you’re comfortable with Java but haven’t worked much with Spring Boot, brush up on Spring Boot and JPA fundamentals. Request binding, controller/service flow, entity mappings, repository methods, transactions, and dirty checking are worth understanding before this round.

Questions asked (1)

  1. 01

    Validate Card PIN with Specific Rules

    Other

    Implement validation for a card PIN update in an existing Spring Boot application. The PIN must meet the following criteria:

    1. Exactly four digits long.
    2. Contains only numeric digits (no letters or symbols).
    3. No repeating digits anywhere in the PIN (e.g., 1213 is invalid).
    4. Positive value.

    The current data model stores the PIN as an int, which cannot preserve leading zeros. The task requires changing the PIN field in the Card entity from int to String and updating all related layers (controller, service, JPA mapping) accordingly. The PATCH endpoint should accept the new string representation, apply the validation rules, update the database while preserving leading zeros, and reject invalid inputs without altering other card fields. Include unit/integration tests to verify validation, leading‑zero handling, and unchanged state on failure.

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Atlassian recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!