@Test public void testInValidCodeCausOfCheckSum() { String codeString = "ABCD-47BD-A46B-A3BB"; assertThat(_codegenerator.isValid(codeString)).isFalse(); }
public boolean isValid(final String code) { if (CodeHelper.isValid(code)) { return _codeRepository.findByCode(code) != null; } else { return false; } }
CodeGenerator { public boolean isValid(final String code) { if (CodeHelper.isValid(code)) { return _codeRepository.findByCode(code) != null; } else { return false; } } }
CodeGenerator { public boolean isValid(final String code) { if (CodeHelper.isValid(code)) { return _codeRepository.findByCode(code) != null; } else { return false; } }  }
CodeGenerator { public boolean isValid(final String code) { if (CodeHelper.isValid(code)) { return _codeRepository.findByCode(code) != null; } else { return false; } }  List<Code> generate(final Event event, final int count, final int treeCount); List<Code> generate(final Event event, final int count, final float price); Code generate(final Gift gift); Code generate(final Gift gift, final int year, final int month, final int number); Code generate(final Event event, final int year, final int month, final int number); boolean isValid(final String code); }
CodeGenerator { public boolean isValid(final String code) { if (CodeHelper.isValid(code)) { return _codeRepository.findByCode(code) != null; } else { return false; } }  List<Code> generate(final Event event, final int count, final int treeCount); List<Code> generate(final Event event, final int count, final float price); Code generate(final Gift gift); Code generate(final Gift gift, final int year, final int month, final int number); Code generate(final Event event, final int year, final int month, final int number); boolean isValid(final String code);  }