package com.sptmobile.link import org.junit.Assert.assertEquals import org.junit.Test class DeviceNameTest { // [unit->REQ-INBOUND-NOTIFS] // The device key shape: MODEL- so two phones of the same model // never share a host-side spool (each would drain-commit the other's // messages away); blank/absent model falls back, never a bare suffix. @Test fun composes_model_and_suffix_with_fallbacks() { assertEquals("Pixel 8-ab12cd34", DeviceName.compose("Pixel 8", "ab12cd34")) assertEquals("spt-mobile-ab12cd34", DeviceName.compose(null, "ab12cd34")) assertEquals("spt-mobile-ab12cd34", DeviceName.compose(" ", "ab12cd34")) assertEquals("Pixel 8", DeviceName.compose("Pixel 8", "")) } }