    @Test
    public void testCodesMatchFormat() {

        RecoveryCodeGenerator generator = new RecoveryCodeGenerator();
        String[] codes = generator.generateCodes(16);

        // Assert each one is the correct format
        for (String code : codes) {
            assertTrue(code.matches("[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}"), code);
        }
    }