* @throws Exception if the test fails
*/
public void testRemoveElementPenalty2() throws Exception {
LinkedList lst = new LinkedList();
lst.add(new KnuthBox(4000, null, false));
lst.add(new KnuthGlue(0, 0, 0, null, false));
lst.add(new KnuthBox(4000, null, false));
lst.add(new KnuthGlue(0, 0, 0, null, false));
lst.add(new KnuthBox(4000, null, false));
lst.add(new KnuthGlue(0, 0, 0, null, false));
lst.add(new KnuthBox(4000, null, false));
lst.add(new KnuthPenalty(0, KnuthElement.INFINITE, false, null, false));
lst.add(new KnuthGlue(0, Integer.MAX_VALUE, 0, null, false));
lst.add(new KnuthPenalty(0, -KnuthElement.INFINITE, false, null, false));
boolean res = ElementListUtils.removeLegalBreaks(lst, 9000);
assertFalse(res);