package com.evsuite.abrp; import static org.junit.Assert.assertEquals; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.junit.Test; /** The update log's line handling — pure JVM. */ public class UpdateLogTest { @Test public void newestComesFirstAndTheOldestFallsOff() { List lines = UpdateLog.append(Arrays.asList("b", "a"), "c", 2); assertEquals(Arrays.asList("c", "b"), lines); } @Test public void aMultiLinePlatformMessageStaysOneLine() { List lines = UpdateLog.append(Collections.emptyList(), "failed:\nINSTALL_X\r", 10); assertEquals(Collections.singletonList("failed: INSTALL_X "), lines); } }