einIdentity

Mock Jutsu HOW-TO | EN

In the realm of financial software development and corporate compliance testing, generating realistic identifiers is a critical step for ensuring system integrity. The mock-jutsu library simplifies this process with its "ein" function, a specialized tool within the Identity category designed to produce synthetic US Employer Identification Numbers. By using mock-jutsu, developers can instantly generate a formatted ein that mimics the nine-digit structure mandated by the Internal Revenue Service. This ensures that test data remains consistent with real-world expectations without exposing sensitive, actual corporate information during the development lifecycle.

Each ein generated by this function adheres to the standard XX-XXXXXXX format, where the first two digits typically represent the campus or regional office code and the remaining seven digits serve as a unique identifier. While these numbers are intended for use as mock data, they are constructed to pass common front-end regex validations and database constraints that require a specific string length and hyphen placement. This level of detail is essential for testing form inputs in business-to-business (B2B) applications, payroll processing engines, and tax preparation software where a validly formatted ein is a mandatory field for user registration or document filing.

Integrating this function into an existing workflow is seamless, whether you are working in a local terminal, a Python script, or a performance testing environment. Developers can leverage the CLI command "mockjutsu generate ein" to produce quick samples, use the Python API via jutsu.generate('ein') for bulk test data generation, or utilize the JMeter plugin to simulate realistic load tests involving thousands of unique business entities. The primary benefit of using mock-jutsu for this purpose is the elimination of manual data entry and the reduction of risks associated with using real company data in non-production environments.

Beyond simple data entry, the ein function is indispensable for verifying Know Your Business (KYB) workflows and edge-case handling in financial pipelines. By incorporating high-quality mock data into automated testing suites, teams can ensure their applications handle various EIN-related logic paths, such as duplicate detection or formatting normalization, with high confidence. Ultimately, mock-jutsu provides a robust, professional-grade solution for teams that require reliable, standardized test data to accelerate their release cycles and maintain high standards of software quality.

CLI Usage
mockjutsu generate einmockjutsu bulk ein --count 10mockjutsu export ein --count 10 --format jsonmockjutsu export ein --count 10 --format csvmockjutsu export ein --count 10 --format sql# --mask: regulation-compliant output (PCI DSS / GDPR / KVKK)mockjutsu generate ein --maskmockjutsu bulk ein --count 5 --mask
Python API
from mockjutsu import jutsujutsu.generate('ein')jutsu.bulk('ein', count=10)jutsu.template(['ein'], count=5)# mask=True: regulation-compliant outputjutsu.generate('ein', mask=True)jutsu.bulk('ein', count=5, mask=True)
JMeter
${__mockjutsu_identity(ein)}# JMeter Function: __mockjutsu_identity# Parameter 1: ein# Parameter 2: (not required for this function)# Add 'mask' keyword to get a regulation-compliant masked value${__mockjutsu_identity(ein,mask)}
REST API
GET /generate/ein# → {"type":"ein","result":"...","status":"ok"}GET /bulk/ein?count=10POST /template {"types":["ein"],"count":1}# mask=true: regulation-compliant outputGET /generate/ein?mask=trueGET /bulk/ein?count=5&mask=true

Parameters

Parameter Values Description
--mask true | false Return a regulation-compliant masked value (PCI DSS, GDPR, KVKK…)

Other Languages