UPCEANLogicImpl { protected static String removeSupplemental(String msg) { final int pos = msg.indexOf('+'); if (pos >= 0) { return msg.substring(0, pos); } else { return msg; } } UPCEANLogicImpl(ChecksumMode mode); ChecksumMode getChecksumMode(); void validateMessage(String msg); char calcChecksum(String msg); abstract void generateBarcodeLogic(ClassicBarcodeLogicHandler logic, String msg);  }
@Test public void testRemoveSupplemental() throws Exception { assertEquals("1234", UPCEANLogicImpl.removeSupplemental("1234")); assertEquals("1234", UPCEANLogicImpl.removeSupplemental("1234+20")); }