}
@Test
public void twoPattern_overlap(){
PasswordAnalysis_Unoptimized pa = new PasswordAnalysis_Unoptimized("12345");
pa.foundPattern(new PasswordPattern(1, 1, "2", 15, "worstPattern"));
pa.foundPattern(new PasswordPattern(1, 1, "2", 4, "bestPattern"));
pa.foundPattern(new PasswordPattern(1, 1, "2", 20, "worsePattern"));
pa.foundPattern(new PasswordPattern(1, 1, "2", 23, "worserPattern"));
pa.foundPattern(new PasswordPattern(2, 2, "34", 15, "worstPattern"));
pa.foundPattern(new PasswordPattern(2, 2, "34", 20, "worsePattern"));
pa.foundPattern(new PasswordPattern(2, 2, "34", 23, "worserPattern"));
pa.foundPattern(new PasswordPattern(2, 2, "34", 4, "bestPattern"));
pa.foundPattern(new PasswordPattern(4, 1, "5", 15, "worstPattern"));
pa.foundPattern(new PasswordPattern(4, 1, "5", 20, "worsePattern"));
pa.foundPattern(new PasswordPattern(4, 1, "5", 4, "bestPattern"));
pa.foundPattern(new PasswordPattern(4, 1, "5", 23, "worserPattern"));
PathCost patterns = pa.calculateHighestProbablePatterns();
List<PasswordPattern> list = patterns.getPath();
assertEquals(4, list.size());