void () { ResourceBundle bundle = ResourceBundle.getBundle("com.intellij.util.text.BundleBaseTest$TestBundle"); String template = BundleBase.partialMessage(bundle, "partial", 1, new Object[]{"User{Name}"}); assertThat(template).isEqualTo("Hello ''User'{'Name'}''', let''s play {0}!"); String result = MessageFormat.format(template, "a game"); assertThat(result).isEqualTo("Hello 'User{Name}', let's play a game!"); String template1 = BundleBase.partialMessage(bundle, "partial2", 1, new Object[]{"0'{}", "1'{}"}); String template2 = BundleBase.partialMessage(bundle, "partial2", 2, new Object[]{"0'{}"}); assertThat(MessageFormat.format(template1, "2'{}")).isEqualTo("Param0: 0'{}; Param1: 1'{}; Param2: 2'{}"); assertThat(MessageFormat.format(template2, "1'{}", "2'{}")).isEqualTo("Param0: 0'{}; Param1: 1'{}; Param2: 2'{}"); }