You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2026/06/08 20:44:51 UTC
(juneau) branch master updated: fix: resolve Eclipse/SonarLint warnings across codebase; fix test-migration resource gaps, validation/MDC test deps, and Microservice.stop() config-listener leak
This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/master by this push:
new ee60417c6d fix: resolve Eclipse/SonarLint warnings across codebase; fix test-migration resource gaps, validation/MDC test deps, and Microservice.stop() config-listener leak
ee60417c6d is described below
commit ee60417c6dc6bde0e5b93c8941140b6b6e4dca23
Author: James Bognar <ja...@apache.org>
AuthorDate: Mon Jun 8 16:44:44 2026 -0400
fix: resolve Eclipse/SonarLint warnings across codebase; fix test-migration resource gaps, validation/MDC test deps, and Microservice.stop() config-listener leak
---
.../src/test/java/org/apache/juneau/TestUtils.java | 21 +-
.../src/test/java/org/apache/juneau/TestUtils.java | 16 +-
.../src/test/java/org/apache/juneau/TestUtils.java | 16 +-
.../src/test/java/org/apache/juneau/TestUtils.java | 21 +-
.../html5/Html5Template_ComboRoundTripTest.java | 3 +
.../src/test/java/org/apache/juneau/TestUtils.java | 10 +-
.../src/test/java/org/apache/juneau/TestUtils.java | 10 +-
.../src/test/java/org/apache/juneau/TestUtils.java | 21 +-
.../juneau/bean/jsonschema/JsonSchemaMap_Test.java | 3 +-
.../src/test/java/org/apache/juneau/TestUtils.java | 16 +-
.../src/test/java/org/apache/juneau/TestUtils.java | 19 +-
.../src/test/java}/org/apache/juneau/TestBase.java | 0
.../juneau/bean/rfc7807/ProblemException_Test.java | 101 +
.../src/test/java/org/apache/juneau/TestUtils.java | 19 +-
.../juneau/bean/swagger/ui/SwaggerUI_Test.java | 3 +-
.../src/test/java/org/apache/juneau/TestUtils.java | 19 +-
.../apache/juneau/assertions/Assertion_Test.java | 3 +
.../juneau/utest/utils/FakeStreamSerializer.java | 3 +
.../juneau/utest/utils/FakeWriterSerializer.java | 3 +
.../juneau/junit/bct/BasicBeanConverter_Test.java | 4 +-
.../apache/juneau/junit/bct/BctConfig_Test.java | 2 +
.../apache/juneau/junit/bct/Listifier_Test.java | 2 +
.../juneau/junit/bct/NestedTokenizer_Test.java | 2 +
.../apache/juneau/junit/bct/Stringifier_Test.java | 2 +
.../org/apache/juneau/junit/bct/Swapper_Test.java | 2 +
.../commons/AppliedAnnotationObject_Test.java | 3 +-
.../org/apache/juneau/commons/TestAssertions.java | 6 +-
.../java/org/apache/juneau/commons/TestUtils.java | 4 +-
.../juneau/commons/bean/BeanMap_Coverage_Test.java | 3 +
.../commons/bean/BeanMeta_Coverage_Test.java | 4 +-
.../bean/BeanPropertyMeta_Coverage_Test.java | 4 +-
.../commons/collections/FilteredList_Test.java | 3 +
.../commons/collections/FilteredMap_Test.java | 3 +
.../commons/collections/FilteredSet_Test.java | 3 +
.../juneau/commons/collections/Maps_Test.java | 1 -
.../juneau/commons/collections/Sets_Test.java | 1 -
.../juneau/commons/collections/SimpleMap_Test.java | 3 +
.../concurrent/SimpleReadWriteLock_Test.java | 3 +
.../commons/conversion/CachingConverter_Test.java | 12 +-
.../conversion/ConfigurableConverter_Test.java | 3 +
.../juneau/commons/function/BeanChannel_Test.java | 9 +-
.../juneau/commons/function/Memoizer_Test.java | 5 +-
.../inject/BasicBeanStore_PushPopOverlay_Test.java | 5 +-
.../juneau/commons/inject/BasicBeanStore_Test.java | 9 +-
.../juneau/commons/inject/BeanAnnotation_Test.java | 4 +-
.../inject/BeanInstantiator_OptionD_Test.java | 5 +-
.../commons/inject/BeanInstantiator_Test.java | 4 +-
.../juneau/commons/inject/Conditional_Test.java | 3 +-
.../juneau/commons/inject/Configuration_Test.java | 5 +-
.../juneau/commons/inject/JsrSupport_Test.java | 4 +-
.../juneau/commons/inject/Lifecycle_Test.java | 6 +-
.../commons/inject/PrimaryAndOrder_Test.java | 5 +-
.../juneau/commons/inject/Snapshot_Test.java | 3 +
.../juneau/commons/inject/StackOverlay_Test.java | 3 +
.../inject/Value_SupplierTypedFieldType_Test.java | 9 +-
.../apache/juneau/commons/inject/Value_Test.java | 3 +
.../org/apache/juneau/commons/io/Console_Test.java | 3 +
.../juneau/commons/io/FileReaderBuilder_Test.java | 3 +
.../apache/juneau/commons/io/LocalDir_Test.java | 3 +
.../apache/juneau/commons/io/LocalFile_Test.java | 3 +-
.../juneau/commons/io/PathReaderBuilder_Test.java | 3 +
.../juneau/commons/io/ReaderInputStream_Test.java | 3 +-
.../commons/io/StringBuilderWriter_Test.java | 3 +-
.../apache/juneau/commons/lang/Version_Test.java | 3 +-
.../apache/juneau/commons/logging/Logger_Test.java | 4 +-
.../commons/reflect/AnnotationInfo_Test.java | 5 +-
.../commons/reflect/ConstructorInfo_Test.java | 6 +-
.../juneau/commons/reflect/MethodInfo_Test.java | 4 +-
.../reflect/ParameterInfo_OptionalValue_Test.java | 3 +
.../reflect/ParameterInfo_Resolution_Test.java | 8 +-
.../juneau/commons/reflect/ParameterInfo_Test.java | 6 +-
.../juneau/commons/reflect/ReflectionMap_Test.java | 3 +-
.../commons/reflect/ReflectionUtils_Test.java | 3 +-
.../apache/juneau/commons/svl/ArgCoercer_Test.java | 4 +-
.../juneau/commons/svl/VarFunction_Test.java | 4 +-
.../commons/svl/VarResolverSession_Test.java | 3 +
.../commons/svl/functions/MiniJson_Test.java | 20 +-
.../juneau/commons/utils/AnnotationUtils_Test.java | 3 +-
.../juneau/commons/utils/ClassUtils_Test.java | 5 +-
.../utils/FileUtils_ResolveSafely_Test.java | 3 +
.../juneau/commons/utils/StringUtils_Test.java | 5 +-
.../src/test/java/org/apache/juneau/TestUtils.java | 18 +-
.../apache/juneau/config/ConfigBuilder_Test.java | 5 +-
.../apache/juneau/config/ConfigImportsTest.java | 3 +
.../juneau/config/ConfigMapListener_Test.java | 4 +-
.../org/apache/juneau/config/ConfigMap_Test.java | 3 +-
.../config/ConfigPropertySourceProvider_Test.java | 3 +-
.../juneau/config/ConfigPropertySource_Test.java | 3 +
.../juneau/config/ConfigYamlFormat_Test.java | 3 +-
.../java/org/apache/juneau/config/Config_Test.java | 7 +-
.../config/store/ConfigClasspathStore_Test.java | 3 +
.../juneau/config/store/ConfigFileStoreTest.java | 3 +
.../config/store/ConfigMemoryStore_Test.java | 3 +
.../juneau/utest/utils/FakeStreamParser.java | 3 +
.../juneau/utest/utils/FakeStreamSerializer.java | 3 +
.../juneau/utest/utils/FakeWriterSerializer.java | 3 +
.../juneau/{org/apache/juneau => }/TestBase.java | 0
.../junit5/JuneauBeanStoreExtension_Test.java | 4 +-
.../apache/juneau/junit5/TestBeanStore_Test.java | 5 +-
juneau-core/juneau-marshall-rdf/pom.xml | 18 +
.../juneau/marshall/jena/RdfAnnotation_Test.java | 80 +
.../marshall/jena/RdfConfigAnnotation_Test.java | 341 +++
.../juneau/marshall/jena/RdfParser_Test.java | 457 ++++
.../juneau/marshall/jena/RdfSerializer_Test.java | 615 +++++
.../apache/juneau/marshall/jena/RdfUtils_Test.java | 218 ++
juneau-core/juneau-marshall/files/Test3.properties | 15 +
.../juneau-marshall/files/Test3_ja.properties | 15 +
.../juneau-marshall/files/Test3_ja_JP.properties | 15 +
juneau-core/juneau-marshall/files/test1/.c | 13 +
juneau-core/juneau-marshall/files/test1/.c_ja | 13 +
juneau-core/juneau-marshall/files/test1/.c_ja_JP | 13 +
juneau-core/juneau-marshall/files/test1/.d.txt | 13 +
juneau-core/juneau-marshall/files/test1/.d_ja.txt | 13 +
.../juneau-marshall/files/test1/.d_ja_JP.txt | 13 +
juneau-core/juneau-marshall/files/test1/_a.txt | 13 +
juneau-core/juneau-marshall/files/test1/_a_ja.txt | 13 +
.../juneau-marshall/files/test1/_a_ja_JP.txt | 13 +
juneau-core/juneau-marshall/files/test1/_b | 13 +
juneau-core/juneau-marshall/files/test1/_b_ja | 13 +
juneau-core/juneau-marshall/files/test1/_b_ja_JP | 13 +
juneau-core/juneau-marshall/files/test1/dir/.c | 13 +
juneau-core/juneau-marshall/files/test1/dir/.c_ja | 13 +
.../juneau-marshall/files/test1/dir/.c_ja_JP | 13 +
juneau-core/juneau-marshall/files/test1/dir/.d.txt | 13 +
.../juneau-marshall/files/test1/dir/.d_ja.txt | 13 +
.../juneau-marshall/files/test1/dir/.d_ja_JP.txt | 13 +
juneau-core/juneau-marshall/files/test1/dir/_a.txt | 13 +
.../juneau-marshall/files/test1/dir/_a_ja.txt | 13 +
.../juneau-marshall/files/test1/dir/_a_ja_JP.txt | 13 +
juneau-core/juneau-marshall/files/test1/dir/_b | 13 +
juneau-core/juneau-marshall/files/test1/dir/_b_ja | 13 +
.../juneau-marshall/files/test1/dir/_b_ja_JP | 13 +
juneau-core/juneau-marshall/files/test1/dir/dir/.c | 13 +
.../juneau-marshall/files/test1/dir/dir/.c_ja | 13 +
.../juneau-marshall/files/test1/dir/dir/.c_ja_JP | 13 +
.../juneau-marshall/files/test1/dir/dir/.d.txt | 13 +
.../juneau-marshall/files/test1/dir/dir/.d_ja.txt | 13 +
.../files/test1/dir/dir/.d_ja_JP.txt | 13 +
.../juneau-marshall/files/test1/dir/dir/_a.txt | 13 +
.../juneau-marshall/files/test1/dir/dir/_a_ja.txt | 13 +
.../files/test1/dir/dir/_a_ja_JP.txt | 13 +
juneau-core/juneau-marshall/files/test1/dir/dir/_b | 13 +
.../juneau-marshall/files/test1/dir/dir/_b_ja | 13 +
.../juneau-marshall/files/test1/dir/dir/_b_ja_JP | 13 +
.../juneau-marshall/files/test1/dir/dir/e.txt | 13 +
.../juneau-marshall/files/test1/dir/dir/e_ja.txt | 13 +
.../files/test1/dir/dir/e_ja_JP.txt | 13 +
juneau-core/juneau-marshall/files/test1/dir/dir/f | 13 +
.../juneau-marshall/files/test1/dir/dir/f_ja | 13 +
.../juneau-marshall/files/test1/dir/dir/f_ja_JP | 13 +
.../juneau-marshall/files/test1/dir/dir/g_foo.txt | 13 +
.../files/test1/dir/dir/g_foo_ja.txt | 13 +
.../files/test1/dir/dir/g_foo_ja_JP.txt | 13 +
.../juneau-marshall/files/test1/dir/dir/h.foo.txt | 13 +
.../files/test1/dir/dir/h.foo_ja.txt | 13 +
.../files/test1/dir/dir/h.foo_ja_JP.txt | 13 +
.../juneau-marshall/files/test1/dir/dir/i_foo | 13 +
.../juneau-marshall/files/test1/dir/dir/i_foo_ja | 13 +
.../files/test1/dir/dir/i_foo_ja_JP | 13 +
juneau-core/juneau-marshall/files/test1/dir/e.txt | 13 +
.../juneau-marshall/files/test1/dir/e_ja.txt | 13 +
.../juneau-marshall/files/test1/dir/e_ja_JP.txt | 13 +
juneau-core/juneau-marshall/files/test1/dir/f | 13 +
juneau-core/juneau-marshall/files/test1/dir/f_ja | 13 +
.../juneau-marshall/files/test1/dir/f_ja_JP | 13 +
.../juneau-marshall/files/test1/dir/g_foo.txt | 13 +
.../juneau-marshall/files/test1/dir/g_foo_ja.txt | 13 +
.../files/test1/dir/g_foo_ja_JP.txt | 13 +
.../juneau-marshall/files/test1/dir/h.foo.txt | 13 +
.../juneau-marshall/files/test1/dir/h.foo_ja.txt | 13 +
.../files/test1/dir/h.foo_ja_JP.txt | 13 +
juneau-core/juneau-marshall/files/test1/dir/i_foo | 13 +
.../juneau-marshall/files/test1/dir/i_foo_ja | 13 +
.../juneau-marshall/files/test1/dir/i_foo_ja_JP | 13 +
juneau-core/juneau-marshall/files/test1/e.txt | 13 +
juneau-core/juneau-marshall/files/test1/e_ja.txt | 13 +
.../juneau-marshall/files/test1/e_ja_JP.txt | 13 +
juneau-core/juneau-marshall/files/test1/f | 13 +
juneau-core/juneau-marshall/files/test1/f_ja | 13 +
juneau-core/juneau-marshall/files/test1/f_ja_JP | 13 +
juneau-core/juneau-marshall/files/test1/g_foo.txt | 13 +
.../juneau-marshall/files/test1/g_foo_ja.txt | 13 +
.../juneau-marshall/files/test1/g_foo_ja_JP.txt | 13 +
juneau-core/juneau-marshall/files/test1/h.foo.txt | 13 +
.../juneau-marshall/files/test1/h.foo_ja.txt | 13 +
.../juneau-marshall/files/test1/h.foo_ja_JP.txt | 13 +
juneau-core/juneau-marshall/files/test1/i_foo | 13 +
juneau-core/juneau-marshall/files/test1/i_foo_ja | 13 +
.../juneau-marshall/files/test1/i_foo_ja_JP | 13 +
juneau-core/juneau-marshall/files/test2/a.txt | 13 +
juneau-core/juneau-marshall/files/test2/dir/a.txt | 13 +
.../juneau-marshall/files/test2/dir/dir/a.txt | 13 +
.../juneau-marshall/files/test2/ja/JP/a.txt | 13 +
.../juneau-marshall/files/test2/ja/JP/dir/a.txt | 13 +
.../files/test2/ja/JP/dir/dir/a.txt | 13 +
juneau-core/juneau-marshall/files/test2/ja/a.txt | 13 +
.../juneau-marshall/files/test2/ja/dir/a.txt | 13 +
.../juneau-marshall/files/test2/ja/dir/dir/a.txt | 13 +
.../marshall/MarshalledPropertyPostProcessor.java | 3 +-
.../apache/juneau/marshall/MarshallingContext.java | 3 +-
.../juneau/marshall/xml/XmlParserSession.java | 10 +-
.../juneau/marshall/xml/XmlSerializerSession.java | 3 -
.../src/test/java/org/apache/juneau/TestUtils.java | 24 +-
.../java/org/apache/juneau/cp/FileFinder_Test.java | 5 +-
.../java/org/apache/juneau/cp/Messages_Test.java | 160 ++
.../apache/juneau/cp/sub/FileFinder_Test2.java} | 6 +-
.../juneau/cp/test3/MessageBundleTest1.java} | 5 +-
.../java/org/apache/juneau/cp/test3/Test1.java} | 5 +-
.../java/org/apache/juneau/cp/test4/Test2.java} | 7 +-
.../org/apache/juneau/marshall/ClassMeta_Test.java | 1 +
.../MarshalledPropertyPostProcessor_Test.java | 4 +-
.../juneau/marshall/bson/BsonInputStream_Test.java | 8 +-
.../marshall/cbor/CborParserSession_Test.java | 25 +-
.../juneau/marshall/collections/JsonList_Test.java | 289 +++
.../juneau/marshall/collections/JsonMap_Test.java | 317 +++
.../marshall/collections/MarshalledList_Test.java | 213 ++
.../marshall/collections/MarshalledMap_Test.java | 777 ++++++
.../collections/ResolvingMarshalledMapTest.java | 186 ++
.../marshall/csv/CsvCellSerializer_Test.java | 4 +-
.../marshall/csv/CsvSerializerSession_Test.java | 20 +-
.../EncoderSet_OverridingBeanStore_Test.java} | 17 +-
.../juneau/marshall}/encoders/EncoderSet_Test.java | 8 +-
.../juneau/marshall/hjson/HjsonEdgeCases_Test.java | 4 +-
.../juneau/marshall/hjson/HjsonMediaType_Test.java | 4 +-
.../juneau/marshall/hjson/HjsonParser_Test.java | 4 +-
.../juneau/marshall/hocon/HoconEdgeCases_Test.java | 4 +-
.../juneau/marshall/hocon/HoconMediaType_Test.java | 4 +-
.../juneau/marshall/hocon/HoconMerging_Test.java | 4 +-
.../marshall/hocon/HoconParserSession_Test.java | 17 +-
.../juneau/marshall/hocon/HoconPath_Test.java | 4 +-
.../hocon/HoconSerializerSession_Test.java | 4 +-
.../marshall/hocon/HoconSubstitution_Test.java | 4 +-
.../juneau/marshall/html/BasicHtml_Test.java | 5 +-
.../marshall/httppart/OpenApiPartParser_Test.java | 3 +-
.../apache/juneau/marshall/ini/IniParser_Test.java | 4 +-
.../juneau/marshall/json/JsonParser_Test.java | 3 +
.../org/apache/juneau/marshall/json/Json_Test.java | 4 +-
.../juneau/marshall/json5/Json5List_Test.java | 7 -
.../juneau/marshall/json5/Json5Map_Test.java | 13 +-
.../jsonschema/JsonSchemaGeneratorTest.java | 5 +-
.../marshall/markdown/MarkdownAiUseCase_Test.java | 167 ++
.../marshall/markdown/MarkdownAnnotation_Test.java | 266 +++
.../marshall}/markdown/MarkdownDocParser_Test.java | 7 +-
.../markdown/MarkdownDocSerializer_Test.java | 315 +++
.../marshall/markdown/MarkdownEdgeCases_Test.java | 202 ++
.../marshall/markdown/MarkdownMediaType_Test.java | 46 +
.../markdown/MarkdownParserSession_Test.java | 75 +-
.../marshall}/markdown/MarkdownParser_Test.java | 39 +-
.../markdown/MarkdownSerializer_Test.java | 15 +-
.../marshall/markdown/MarkdownWriter_Test.java | 132 +
.../marshall/msgpack/MsgPackParser_Test.java | 3 +
.../marshall/objecttools/ObjectRest_Test.java | 6 +-
.../marshall/objecttools/ObjectSearcher_Test.java | 2 +-
.../parquet/ParquetParserSession_Test.java | 5 +-
.../juneau/marshall/parser/ParserSession_Test.java | 3 +-
.../parser/ParserSet_OverridingBeanStore_Test.java | 3 +
.../juneau/marshall/parser/ParserSet_Test.java | 5 +-
.../juneau/marshall/proto/ProtoRoundTrip_Test.java | 2 +-
.../proto/ProtoSerializerSession_Test.java | 12 +-
.../SerializerConfigAnnotation_Test.java | 12 +-
.../serializer/SerializerSession_Test.java | 3 +
.../SerializerSet_OverridingBeanStore_Test.java | 3 +
.../marshall/serializer/SerializerSet_Test.java | 5 +-
.../marshall/serializer/UriResolution_Test.java | 3 +-
.../marshall/toml/TomlSerializerSession_Test.java | 6 +-
.../juneau/marshall/toml/TomlWriter_Test.java | 3 +
.../org/apache/juneau/marshall/toml/Toml_Test.java | 8 +-
.../marshall/transform/AutoListSwapTest.java | 3 +-
.../juneau/marshall/transform/AutoMapSwapTest.java | 3 +-
.../marshall/transform/AutoNumberSwapTest.java | 3 +-
.../marshall/transform/AutoObjectSwapTest.java | 5 +-
.../BigNumberFormat_BigDecimal_RoundTrip_Test.java | 3 +
.../BigNumberFormat_BigInteger_RoundTrip_Test.java | 3 +
.../transforms/BinaryEnumFormatPlacement_Test.java | 4 +-
.../transforms/BinaryFormat_RoundTrip_Test.java | 3 +
...leanFloatCurrencyClassFormatPlacement_Test.java | 4 +-
.../transforms/BooleanFormat_RoundTrip_Test.java | 3 +
.../transforms/CalendarFormat_RoundTrip_Test.java | 3 +
.../marshall/transforms/CalendarFormat_Test.java | 4 +-
.../ClassFormatSwap_SessionClassLoader_Test.java | 4 +
.../transforms/ClassFormat_RoundTrip_Test.java | 3 +
.../transforms/CurrencyFormat_RoundTrip_Test.java | 5 +-
.../transforms/DateFormat_RoundTrip_Test.java | 3 +
.../marshall/transforms/DateFormat_Test.java | 4 +-
.../DateTimeLocaleFormatPlacement_Test.java | 8 +-
.../transforms/DurationFormat_RoundTrip_Test.java | 4 +
.../transforms/EnumFormat_RoundTrip_Test.java | 3 +
.../FloatFormat_Double_RoundTrip_Test.java | 3 +
.../FloatFormat_Float_RoundTrip_Test.java | 3 +
.../transforms/LocaleFormat_RoundTrip_Test.java | 3 +
.../juneau/marshall/transforms/ObjectSwapTest.java | 4 +-
.../transforms/PeriodFormat_RoundTrip_Test.java | 4 +
.../TemporalFormat_Instant_RoundTrip_Test.java | 3 +
...emporalFormat_LocalDateTime_RoundTrip_Test.java | 3 +
.../TemporalFormat_LocalDate_RoundTrip_Test.java | 3 +
.../TemporalFormat_LocalTime_RoundTrip_Test.java | 3 +
.../TemporalFormat_MonthDay_RoundTrip_Test.java | 3 +
...mporalFormat_OffsetDateTime_RoundTrip_Test.java | 3 +
.../TemporalFormat_OffsetTime_RoundTrip_Test.java | 3 +
.../marshall/transforms/TemporalFormat_Test.java | 4 +-
.../TemporalFormat_YearMonth_RoundTrip_Test.java | 3 +
.../TemporalFormat_Year_RoundTrip_Test.java | 3 +
...emporalFormat_ZonedDateTime_RoundTrip_Test.java | 3 +
.../transforms/TimeZoneFormat_RoundTrip_Test.java | 3 +
.../UuidBigNumberFormatPlacement_Test.java | 4 +-
.../transforms/UuidFormat_RoundTrip_Test.java | 3 +
.../juneau/marshall/uon/UonParserSession_Test.java | 10 +-
.../apache/juneau/marshall/uon/UonParser_Test.java | 3 +-
.../urlencoding/UrlEncodingParserSession_Test.java | 34 +-
.../apache/juneau/marshall/xml/BasicXml_Test.java | 4 +-
.../juneau/marshall/xml/InvalidXmlBeans_Test.java | 3 +-
.../apache/juneau/marshall/xml/XmlUtils_Test.java | 3 +
.../org/apache/juneau/marshall/xml/Xml_Test.java | 4 +-
.../org/apache/juneau/marshall/yaml/Yaml_Test.java | 21 +-
.../org/apache/juneau/marshaller/Csv_Test.java | 3 +-
.../org/apache/juneau/marshaller/Hjson_Test.java | 4 +-
.../org/apache/juneau/marshaller/Hocon_Test.java | 4 +-
.../org/apache/juneau/marshaller/Html_Test.java | 3 +
.../org/apache/juneau/marshaller/Json5_Test.java | 3 +
.../org/apache/juneau/marshaller/Json_Test.java | 3 +
.../org/apache/juneau/marshaller/Jsonl_Test.java | 3 +-
.../juneau/marshaller/MarshallUtils_Test.java | 48 +-
.../org/apache/juneau/marshaller/MsgPack_Test.java | 3 +
.../org/apache/juneau/marshaller/OpenApi_Test.java | 3 +
.../apache/juneau/marshaller/PlainText_Test.java | 3 +
.../org/apache/juneau/marshaller/Uon_Test.java | 3 +
.../apache/juneau/marshaller/UrlEncoding_Test.java | 3 +
.../org/apache/juneau/marshaller/Xml_Test.java | 3 +
.../juneau/utest/utils/FakeStreamParser.java | 3 +
.../juneau/utest/utils/FakeStreamSerializer.java | 3 +
.../juneau/utest/utils/FakeWriterSerializer.java | 3 +
.../src/test/resources/files/Test3.properties | 15 +
.../src/test/resources/files/Test3_ja.properties | 15 +
.../test/resources/files/Test3_ja_JP.properties | 15 +
.../src/test/resources/files/test1/.c | 13 +
.../src/test/resources/files/test1/.c_ja | 13 +
.../src/test/resources/files/test1/.c_ja_JP | 13 +
.../src/test/resources/files/test1/.d.txt | 13 +
.../src/test/resources/files/test1/.d_ja.txt | 13 +
.../src/test/resources/files/test1/.d_ja_JP.txt | 13 +
.../src/test/resources/files/test1/_a.txt | 13 +
.../src/test/resources/files/test1/_a_ja.txt | 13 +
.../src/test/resources/files/test1/_a_ja_JP.txt | 13 +
.../src/test/resources/files/test1/_b | 13 +
.../src/test/resources/files/test1/_b_ja | 13 +
.../src/test/resources/files/test1/_b_ja_JP | 13 +
.../src/test/resources/files/test1/dir/.c | 13 +
.../src/test/resources/files/test1/dir/.c_ja | 13 +
.../src/test/resources/files/test1/dir/.c_ja_JP | 13 +
.../src/test/resources/files/test1/dir/.d.txt | 13 +
.../src/test/resources/files/test1/dir/.d_ja.txt | 13 +
.../test/resources/files/test1/dir/.d_ja_JP.txt | 13 +
.../src/test/resources/files/test1/dir/_a.txt | 13 +
.../src/test/resources/files/test1/dir/_a_ja.txt | 13 +
.../test/resources/files/test1/dir/_a_ja_JP.txt | 13 +
.../src/test/resources/files/test1/dir/_b | 13 +
.../src/test/resources/files/test1/dir/_b_ja | 13 +
.../src/test/resources/files/test1/dir/_b_ja_JP | 13 +
.../src/test/resources/files/test1/dir/dir/.c | 13 +
.../src/test/resources/files/test1/dir/dir/.c_ja | 13 +
.../test/resources/files/test1/dir/dir/.c_ja_JP | 13 +
.../src/test/resources/files/test1/dir/dir/.d.txt | 13 +
.../test/resources/files/test1/dir/dir/.d_ja.txt | 13 +
.../resources/files/test1/dir/dir/.d_ja_JP.txt | 13 +
.../src/test/resources/files/test1/dir/dir/_a.txt | 13 +
.../test/resources/files/test1/dir/dir/_a_ja.txt | 13 +
.../resources/files/test1/dir/dir/_a_ja_JP.txt | 13 +
.../src/test/resources/files/test1/dir/dir/_b | 13 +
.../src/test/resources/files/test1/dir/dir/_b_ja | 13 +
.../test/resources/files/test1/dir/dir/_b_ja_JP | 13 +
.../src/test/resources/files/test1/dir/dir/e.txt | 13 +
.../test/resources/files/test1/dir/dir/e_ja.txt | 13 +
.../test/resources/files/test1/dir/dir/e_ja_JP.txt | 13 +
.../src/test/resources/files/test1/dir/dir/f | 13 +
.../src/test/resources/files/test1/dir/dir/f_ja | 13 +
.../src/test/resources/files/test1/dir/dir/f_ja_JP | 13 +
.../test/resources/files/test1/dir/dir/g_foo.txt | 13 +
.../resources/files/test1/dir/dir/g_foo_ja.txt | 13 +
.../resources/files/test1/dir/dir/g_foo_ja_JP.txt | 13 +
.../test/resources/files/test1/dir/dir/h.foo.txt | 13 +
.../resources/files/test1/dir/dir/h.foo_ja.txt | 13 +
.../resources/files/test1/dir/dir/h.foo_ja_JP.txt | 13 +
.../src/test/resources/files/test1/dir/dir/i_foo | 13 +
.../test/resources/files/test1/dir/dir/i_foo_ja | 13 +
.../test/resources/files/test1/dir/dir/i_foo_ja_JP | 13 +
.../src/test/resources/files/test1/dir/e.txt | 13 +
.../src/test/resources/files/test1/dir/e_ja.txt | 13 +
.../src/test/resources/files/test1/dir/e_ja_JP.txt | 13 +
.../src/test/resources/files/test1/dir/f | 13 +
.../src/test/resources/files/test1/dir/f_ja | 13 +
.../src/test/resources/files/test1/dir/f_ja_JP | 13 +
.../src/test/resources/files/test1/dir/g_foo.txt | 13 +
.../test/resources/files/test1/dir/g_foo_ja.txt | 13 +
.../test/resources/files/test1/dir/g_foo_ja_JP.txt | 13 +
.../src/test/resources/files/test1/dir/h.foo.txt | 13 +
.../test/resources/files/test1/dir/h.foo_ja.txt | 13 +
.../test/resources/files/test1/dir/h.foo_ja_JP.txt | 13 +
.../src/test/resources/files/test1/dir/i_foo | 13 +
.../src/test/resources/files/test1/dir/i_foo_ja | 13 +
.../src/test/resources/files/test1/dir/i_foo_ja_JP | 13 +
.../src/test/resources/files/test1/e.txt | 13 +
.../src/test/resources/files/test1/e_ja.txt | 13 +
.../src/test/resources/files/test1/e_ja_JP.txt | 13 +
.../src/test/resources/files/test1/f | 13 +
.../src/test/resources/files/test1/f_ja | 13 +
.../src/test/resources/files/test1/f_ja_JP | 13 +
.../src/test/resources/files/test1/g_foo.txt | 13 +
.../src/test/resources/files/test1/g_foo_ja.txt | 13 +
.../src/test/resources/files/test1/g_foo_ja_JP.txt | 13 +
.../src/test/resources/files/test1/h.foo.txt | 13 +
.../src/test/resources/files/test1/h.foo_ja.txt | 13 +
.../src/test/resources/files/test1/h.foo_ja_JP.txt | 13 +
.../src/test/resources/files/test1/i_foo | 13 +
.../src/test/resources/files/test1/i_foo_ja | 13 +
.../src/test/resources/files/test1/i_foo_ja_JP | 13 +
.../src/test/resources/files/test1/j.class | 13 +
.../src/test/resources/files/test1/j_ja.class | 13 +
.../src/test/resources/files/test1/j_ja_JP.class | 13 +
.../src/test/resources/files/test1/k.properties | 13 +
.../src/test/resources/files/test1/k_ja.properties | 13 +
.../test/resources/files/test1/k_ja_JP.properties | 13 +
.../src/test/resources/files/test2/a.txt | 13 +
.../src/test/resources/files/test2/dir/a.txt | 13 +
.../src/test/resources/files/test2/dir/dir/a.txt | 13 +
.../src/test/resources/files/test2/ja/JP/a.txt | 13 +
.../src/test/resources/files/test2/ja/JP/dir/a.txt | 13 +
.../test/resources/files/test2/ja/JP/dir/dir/a.txt | 13 +
.../src/test/resources/files/test2/ja/a.txt | 13 +
.../src/test/resources/files/test2/ja/dir/a.txt | 13 +
.../test/resources/files/test2/ja/dir/dir/a.txt | 13 +
.../src/test/resources/org/apache/juneau/cp/_a.txt | 13 +
.../test/resources/org/apache/juneau/cp/_a_ja.txt | 13 +
.../resources/org/apache/juneau/cp/_a_ja_JP.txt | 13 +
.../resources/org/apache/juneau/cp/files/test1/.c | 13 +
.../org/apache/juneau/cp/files/test1/.c_ja | 13 +
.../org/apache/juneau/cp/files/test1/.c_ja_JP | 13 +
.../org/apache/juneau/cp/files/test1/.d.txt | 13 +
.../org/apache/juneau/cp/files/test1/.d_ja.txt | 13 +
.../org/apache/juneau/cp/files/test1/.d_ja_JP.txt | 13 +
.../org/apache/juneau/cp/files/test1/_a.txt | 13 +
.../org/apache/juneau/cp/files/test1/_a_ja.txt | 13 +
.../org/apache/juneau/cp/files/test1/_a_ja_JP.txt | 13 +
.../resources/org/apache/juneau/cp/files/test1/_b | 13 +
.../org/apache/juneau/cp/files/test1/_b_ja | 13 +
.../org/apache/juneau/cp/files/test1/_b_ja_JP | 13 +
.../org/apache/juneau/cp/files/test1/dir/.c | 13 +
.../org/apache/juneau/cp/files/test1/dir/.c_ja | 13 +
.../org/apache/juneau/cp/files/test1/dir/.c_ja_JP | 13 +
.../org/apache/juneau/cp/files/test1/dir/.d.txt | 13 +
.../org/apache/juneau/cp/files/test1/dir/.d_ja.txt | 13 +
.../apache/juneau/cp/files/test1/dir/.d_ja_JP.txt | 13 +
.../org/apache/juneau/cp/files/test1/dir/_a.txt | 13 +
.../org/apache/juneau/cp/files/test1/dir/_a_ja.txt | 13 +
.../apache/juneau/cp/files/test1/dir/_a_ja_JP.txt | 13 +
.../org/apache/juneau/cp/files/test1/dir/_b | 13 +
.../org/apache/juneau/cp/files/test1/dir/_b_ja | 13 +
.../org/apache/juneau/cp/files/test1/dir/_b_ja_JP | 13 +
.../org/apache/juneau/cp/files/test1/dir/dir/.c | 13 +
.../org/apache/juneau/cp/files/test1/dir/dir/.c_ja | 13 +
.../apache/juneau/cp/files/test1/dir/dir/.c_ja_JP | 13 +
.../apache/juneau/cp/files/test1/dir/dir/.d.txt | 13 +
.../apache/juneau/cp/files/test1/dir/dir/.d_ja.txt | 13 +
.../juneau/cp/files/test1/dir/dir/.d_ja_JP.txt | 13 +
.../apache/juneau/cp/files/test1/dir/dir/_a.txt | 13 +
.../apache/juneau/cp/files/test1/dir/dir/_a_ja.txt | 13 +
.../juneau/cp/files/test1/dir/dir/_a_ja_JP.txt | 13 +
.../org/apache/juneau/cp/files/test1/dir/dir/_b | 13 +
.../org/apache/juneau/cp/files/test1/dir/dir/_b_ja | 13 +
.../apache/juneau/cp/files/test1/dir/dir/_b_ja_JP | 13 +
.../org/apache/juneau/cp/files/test1/dir/dir/e.txt | 13 +
.../apache/juneau/cp/files/test1/dir/dir/e_ja.txt | 13 +
.../juneau/cp/files/test1/dir/dir/e_ja_JP.txt | 13 +
.../org/apache/juneau/cp/files/test1/dir/dir/f | 13 +
.../org/apache/juneau/cp/files/test1/dir/dir/f_ja | 13 +
.../apache/juneau/cp/files/test1/dir/dir/f_ja_JP | 13 +
.../apache/juneau/cp/files/test1/dir/dir/g_foo.txt | 13 +
.../juneau/cp/files/test1/dir/dir/g_foo_ja.txt | 13 +
.../juneau/cp/files/test1/dir/dir/g_foo_ja_JP.txt | 13 +
.../apache/juneau/cp/files/test1/dir/dir/h.foo.txt | 13 +
.../juneau/cp/files/test1/dir/dir/h.foo_ja.txt | 13 +
.../juneau/cp/files/test1/dir/dir/h.foo_ja_JP.txt | 13 +
.../org/apache/juneau/cp/files/test1/dir/dir/i_foo | 13 +
.../apache/juneau/cp/files/test1/dir/dir/i_foo_ja | 13 +
.../juneau/cp/files/test1/dir/dir/i_foo_ja_JP | 13 +
.../org/apache/juneau/cp/files/test1/dir/e.txt | 13 +
.../org/apache/juneau/cp/files/test1/dir/e_ja.txt | 13 +
.../apache/juneau/cp/files/test1/dir/e_ja_JP.txt | 13 +
.../org/apache/juneau/cp/files/test1/dir/f | 13 +
.../org/apache/juneau/cp/files/test1/dir/f_ja | 13 +
.../org/apache/juneau/cp/files/test1/dir/f_ja_JP | 13 +
.../org/apache/juneau/cp/files/test1/dir/g_foo.txt | 13 +
.../apache/juneau/cp/files/test1/dir/g_foo_ja.txt | 13 +
.../juneau/cp/files/test1/dir/g_foo_ja_JP.txt | 13 +
.../org/apache/juneau/cp/files/test1/dir/h.foo.txt | 13 +
.../apache/juneau/cp/files/test1/dir/h.foo_ja.txt | 13 +
.../juneau/cp/files/test1/dir/h.foo_ja_JP.txt | 13 +
.../org/apache/juneau/cp/files/test1/dir/i_foo | 13 +
.../org/apache/juneau/cp/files/test1/dir/i_foo_ja | 13 +
.../apache/juneau/cp/files/test1/dir/i_foo_ja_JP | 13 +
.../org/apache/juneau/cp/files/test1/e.txt | 13 +
.../org/apache/juneau/cp/files/test1/e_ja.txt | 13 +
.../org/apache/juneau/cp/files/test1/e_ja_JP.txt | 13 +
.../resources/org/apache/juneau/cp/files/test1/f | 13 +
.../org/apache/juneau/cp/files/test1/f_ja | 13 +
.../org/apache/juneau/cp/files/test1/f_ja_JP | 13 +
.../org/apache/juneau/cp/files/test1/g_foo.txt | 13 +
.../org/apache/juneau/cp/files/test1/g_foo_ja.txt | 13 +
.../apache/juneau/cp/files/test1/g_foo_ja_JP.txt | 13 +
.../org/apache/juneau/cp/files/test1/h.foo.txt | 13 +
.../org/apache/juneau/cp/files/test1/h.foo_ja.txt | 13 +
.../apache/juneau/cp/files/test1/h.foo_ja_JP.txt | 13 +
.../org/apache/juneau/cp/files/test1/i_foo | 13 +
.../org/apache/juneau/cp/files/test1/i_foo_ja | 13 +
.../org/apache/juneau/cp/files/test1/i_foo_ja_JP | 13 +
.../org/apache/juneau/cp/files/test2/a.txt | 13 +
.../org/apache/juneau/cp/files/test2/dir/a.txt | 13 +
.../org/apache/juneau/cp/files/test2/dir/dir/a.txt | 13 +
.../org/apache/juneau/cp/files/test2/ja/JP/a.txt | 13 +
.../apache/juneau/cp/files/test2/ja/JP/dir/a.txt | 13 +
.../juneau/cp/files/test2/ja/JP/dir/dir/a.txt | 13 +
.../org/apache/juneau/cp/files/test2/ja/a.txt | 13 +
.../org/apache/juneau/cp/files/test2/ja/dir/a.txt | 13 +
.../apache/juneau/cp/files/test2/ja/dir/dir/a.txt | 13 +
.../juneau/cp/test3/MessageBundleTest1.properties | 23 +
.../cp/test3/MessageBundleTest1_ja.properties | 20 +
.../cp/test3/MessageBundleTest1_ja_JP.properties | 15 +
.../apache/juneau/cp/test3/files/Test1.properties | 15 +
.../juneau/cp/test3/files/Test1_ja.properties | 15 +
.../juneau/cp/test3/files/Test1_ja_JP.properties | 15 +
.../org/apache/juneau/cp/test4/Test2.properties | 17 +
.../org/apache/juneau/cp/test4/Test2_ja.properties | 15 +
.../apache/juneau/cp/test4/Test2_ja_JP.properties | 15 +
.../resources/org/apache/juneau/cp/test4/Test4 | 15 +
.../resources/org/apache/juneau/cp/test4/Test4_ja | 15 +
.../org/apache/juneau/cp/test4/Test4_ja_JP | 15 +
.../juneau-test-utils}/pom.xml | 37 +-
.../juneau/CloseableByteArrayInputStream.java} | 26 +-
.../org/apache/juneau/CloseableStringReader.java} | 41 +-
.../src/main/java}/org/apache/juneau/TestBase.java | 0
.../src/main/java/org/apache/juneau/XVar.java} | 33 +-
.../pojos/PrimitiveAtomicObjectsBean.java | 82 +
.../testutils/pojos/PrimitiveObjectsBean.java | 186 ++
.../apache/juneau/testutils/pojos/TestEnum.java} | 9 +-
.../juneau/testutils/pojos/TestEnumToString.java} | 32 +-
.../juneau/utest/utils/CapturingPrintStream.java} | 18 +-
.../org/apache/juneau/utest/utils/Constants.java} | 9 +-
.../juneau/utest/utils/FakeTimeProvider.java} | 35 +-
.../juneau/utest/utils/MutableSupplier.java} | 24 +-
.../juneau/examples/rest/SamplesMicroservice.java | 4 +-
.../logs/jetty-requests.log.203246907 | 0
.../logs/jetty-requests.log.204039320 | 0
.../juneau-microservice-jetty/pom.xml | 6 +
.../juneau/microservice/BootTimeBenchmark.java | 2 +-
.../microservice/MicroserviceTestFixture.java | 200 ++
.../jetty/JettyConfiguration_Test.java | 258 ++
.../microservice/jetty/JettyLogger_Test.java | 550 +++++
.../microservice/jetty/JettyMicroservice_Test.java | 4 +-
.../RestPathsRuntimeOverride_JettyMount_Test.java | 224 ++
.../juneau/microservice/jetty/Rest_Paths_Test.java | 117 +
.../testing/annotations/JettyMicroserviceTest.java | 22 +-
.../juneau/testing/annotations/SpringbootTest.java | 22 +-
.../annotations/TomcatMicroserviceTest.java | 22 +-
.../juneau-microservice-tomcat/pom.xml | 18 +
.../RestPathsRuntimeOverride_TomcatMount_Test.java | 202 ++
.../tomcat/TomcatConfiguration_Test.java | 216 ++
.../microservice/tomcat/TomcatLogger_Test.java | 138 ++
.../microservice/tomcat/Tomcat_Paths_Test.java | 104 +
.../testing/annotations/JettyMicroserviceTest.java | 22 +-
.../juneau/testing/annotations/SpringbootTest.java | 22 +-
.../annotations/TomcatMicroserviceTest.java | 22 +-
juneau-microservice/juneau-microservice/pom.xml | 30 +
.../apache/juneau/microservice/Microservice.java | 9 +
.../microservice/resources/DirectoryResource.java | 5 +-
.../microservice/resources/LogsResource.java | 5 +-
.../BasicMicroserviceListener_Test.java | 51 +
.../apache/juneau/microservice/LogConfig_Test.java | 115 +
.../microservice/Microservice_Builder_Test.java | 5 +-
.../microservice/Microservice_Inject_Test.java | 250 ++
.../microservice/Microservice_Lifecycle_Test.java | 16 +-
.../Microservice_Listener_Fanout_Test.java | 148 ++
.../Microservice_OverridingBeanStore_Test.java | 126 +
.../Microservice_PushPopOverlay_Test.java | 119 +
.../microservice/Microservice_Runtime_Test.java | 506 ++++
.../Microservice_ValueAdoption_Test.java | 62 +
.../microservice/console/ConfigCommand_Test.java | 161 ++
.../microservice/console/ConsoleCommand_Test.java | 166 ++
.../microservice/console/HelpCommand_Test.java | 177 ++
.../resources/ConfigResource_Test.java | 170 ++
.../resources/DirectoryResource_Action_Test.java | 91 +
.../resources/DirectoryResource_Coverage_Test.java | 321 +++
.../DirectoryResource_PathTraversal_Test.java | 320 +++
.../resources/LogEntryFormatter_Test.java | 197 ++
.../microservice/resources/LogParser_Test.java | 414 ++++
.../resources/LogsResource_Action_Test.java | 115 +
.../resources/LogsResource_Coverage_Test.java | 359 +++
.../resources/LogsResource_PathTraversal_Test.java | 294 +++
.../resources/MicroserviceResources_Test.java | 238 ++
.../testing/annotations/JettyMicroserviceTest.java | 22 +-
.../juneau/testing/annotations/SpringbootTest.java | 22 +-
.../annotations/TomcatMicroserviceTest.java | 22 +-
.../juneau/rest/client/remote/RemoteClient.java | 32 +-
juneau-rest/juneau-rest-common-classic/pom.xml | 24 +
.../test/java/org/apache/juneau/BeanTester.java | 297 +++
.../src/test/java/org/apache/juneau/TestUtils.java | 18 +-
.../juneau/http/MediaRanges_FindMatch_Test.java | 195 ++
.../juneau/http/classic/BasicHeader_Test.java | 165 ++
.../http/classic/BasicHttpResource_Test.java | 244 ++
.../apache/juneau/http/classic/BasicPart_Test.java | 229 ++
.../juneau/http/classic/BasicStatusLine_Test.java | 159 ++
.../juneau/http/classic/HttpEntities_Test.java | 275 +++
.../juneau/http/classic/HttpHeaders_Test.java | 93 +
.../apache/juneau/http/classic/HttpParts_Test.java | 519 ++++
.../juneau/http/classic/HttpResources_Test.java | 229 ++
.../juneau/http/classic/SerializedHeader_Test.java | 103 +
.../juneau/http/classic/SerializedPart_Test.java | 104 +
.../http/classic/entity/ByteArrayEntity_Test.java | 135 ++
.../http/classic/entity/FileEntity_Test.java | 197 ++
.../http/classic/entity/ReaderEntity_Test.java | 211 ++
.../http/classic/entity/SerializedEntity_Test.java | 191 ++
.../http/classic/entity/StreamEntity_Test.java | 211 ++
.../classic/header/ContentType_Match_Test.java | 100 +
.../classic/header/ContentType_Other_Test.java | 33 +-
.../http/classic/header/HeaderBeanMeta_Test.java | 105 +
.../http/classic/header/HeaderList_Test.java | 473 ++++
.../http/classic/part/BasicPart_Coverage_Test.java | 219 ++
.../http/classic/part/PartBeanMeta_Test.java | 115 +
.../juneau/http/classic/part/PartList_Test.java | 536 +++++
.../http/classic/resource/BasicResource_Test.java | 297 +++
.../classic/resource/ByteArrayResource_Test.java | 147 ++
.../http/classic/resource/FileResource_Test.java | 189 ++
.../http/classic/resource/ReaderResource_Test.java | 142 ++
.../http/classic/resource/StreamResource_Test.java | 142 ++
.../http/classic/resource/StringResource_Test.java | 150 ++
.../classic/response/ClassicResponse_Test.java | 204 ++
juneau-rest/juneau-rest-common/pom.xml | 24 +
.../test/java/org/apache/juneau/BeanTester.java | 297 +++
.../java/org/apache/juneau/PackageScanner.java | 93 +
.../src/test/java/org/apache/juneau/TestUtils.java | 21 +-
.../juneau/bean/rfc7807/ProblemAdapters_Test.java | 205 ++
.../bean/rfc7807/Problem_RoundTrip_Test.java | 276 +++
.../apache/juneau/http/AnnotationUtils_Test.java | 305 +++
.../apache/juneau/http/ContactAnnotation_Test.java | 94 +
.../juneau/http/HttpFactoryFacades_Test.java | 124 +
.../org/apache/juneau/http/HttpMethod_Test.java | 34 +-
.../org/apache/juneau/http/HttpParts_Test.java | 324 +++
.../juneau/http/HttpProtocolVersion_Test.java | 99 +
.../java/org/apache/juneau/http/Http_Test.java | 770 ++++++
.../apache/juneau/http/LicenseAnnotation_Test.java | 94 +
.../org/apache/juneau/http/MediaRanges_Test.java | 152 ++
.../org/apache/juneau/http/MediaType_Test.java | 80 +
.../juneau/http/ResponseAnnotation_Test.java | 100 +
.../org/apache/juneau/http/StringRange_Test.java | 70 +
.../org/apache/juneau/http/StringRanges_Test.java | 63 +
.../org/apache/juneau/http/TagAnnotation_Test.java | 95 +
.../apache/juneau/http/entity/HttpBodies_Test.java | 211 ++
.../juneau/http/header/ContentType_Test.java | 168 ++
.../apache/juneau/http/header/EntityTag_Test.java | 86 +
.../juneau/http/header/HttpHeaderList_Test.java | 252 ++
.../juneau/http/header/HttpIntegerHeader_Test.java | 110 +
.../juneau/http/header/HttpLongHeader_Test.java | 110 +
.../juneau/http/header/NamedHeaders_Test.java | 308 +++
.../http/header/PolymorphicHeaders_Test.java | 176 ++
.../org/apache/juneau/http/header/Thrown_Test.java | 184 ++
.../juneau/http/part/HttpBooleanPart_Test.java | 123 +
.../apache/juneau/http/part/HttpDatePart_Test.java | 122 +
.../juneau/http/part/HttpIntegerPart_Test.java | 104 +
.../apache/juneau/http/part/HttpLongPart_Test.java | 104 +
.../apache/juneau/http/part/HttpPartList_Test.java | 255 ++
.../apache/juneau/http/part/HttpParts_Test.java | 91 +
.../apache/juneau/http/part/HttpUriPart_Test.java | 117 +
.../http/request/HttpRequestLineBean_Test.java | 74 +
.../http/resource/HttpResourceBean_Test.java | 109 +
.../BasicHttpException_FluentSetters_Test.java | 85 +
.../BasicHttpResponse_FluentSetters_Test.java | 124 +
.../http/response/HttpStatusLineBean_Test.java | 84 +
.../juneau/http/response/NamedResponses_Test.java | 187 ++
.../httppart/bean/HttpPartBeanMeta_Test.java | 163 ++
.../juneau/httppart/bean/MethodInfoUtils_Test.java | 4 +-
.../httppart/HttpPartSchema_Body_Test.java | 807 +++++++
.../httppart/HttpPartSchema_FormData_Test.java | 698 ++++++
.../httppart/HttpPartSchema_Header_Test.java | 660 +++++
.../httppart/HttpPartSchema_Path_Test.java | 727 ++++++
.../httppart/HttpPartSchema_Query_Test.java | 693 ++++++
.../HttpPartSchema_ResponseHeader_Test.java | 647 +++++
.../httppart/HttpPartSchema_Response_Test.java | 586 +++++
.../org/apache/juneau/testutils/pojos/ABean.java | 26 +-
.../testutils/pojos/ImplicitSwappedObject.java | 28 +-
.../juneau/testutils/pojos/SwappedObject.java | 14 +-
.../juneau/testutils/pojos/SwappedObjectSwap.java | 30 +-
.../org/apache/juneau/testutils/pojos/TestURI.java | 69 +
.../apache/juneau/testutils/pojos/TypedBean.java | 6 +-
.../juneau/testutils/pojos/TypedBeanImpl.java | 28 +-
.../org/apache/juneau/testutils/pojos/XBeans.java | 270 +++
.../juneau/utest/utils/FakeReaderParser.java | 50 +-
.../juneau/utest/utils/FakeStreamParser.java | 3 +
.../juneau/utest/utils/FakeStreamSerializer.java | 3 +
.../juneau/utest/utils/FakeWriterSerializer.java | 3 +
juneau-rest/juneau-rest-mock/pom.xml | 59 +
.../src/test/java/jakarta/inject/Inject.java | 20 +-
.../test/java/org/apache/juneau/BeanTester.java | 299 +++
.../src/test/java/org/apache/juneau/TestUtils.java | 540 +++++
.../http/classic/SerializedHttpEntity_Test.java | 118 +
.../http/classic/header/AcceptCharset_Test.java | 84 +
.../http/classic/header/AcceptEncoding_Test.java | 84 +
.../http/classic/header/AcceptLanguage_Test.java | 84 +
.../http/classic/header/AcceptRanges_Test.java | 76 +
.../juneau/http/classic/header/Accept_Test.java | 93 +
.../juneau/http/classic/header/Age_Test.java | 83 +
.../juneau/http/classic/header/Allow_Test.java | 83 +
.../http/classic/header/Authorization_Test.java | 76 +
.../classic/header/BasicBooleanHeader_Test.java | 108 +
.../http/classic/header/BasicCsvHeader_Test.java | 137 ++
.../http/classic/header/BasicDateHeader_Test.java | 113 +
.../classic/header/BasicEntityTagHeader_Test.java | 110 +
.../classic/header/BasicEntityTagsHeader_Test.java | 101 +
.../classic/header/BasicIntegerHeader_Test.java | 110 +
.../http/classic/header/BasicLongHeader_Test.java | 104 +
.../header/BasicMediaRangesHeader_Test.java | 115 +
.../classic/header/BasicMediaTypeHeader_Test.java | 131 +
.../classic/header/BasicStringHeader_Test.java | 84 +
.../header/BasicStringRangesHeader_Test.java | 93 +
.../http/classic/header/BasicUriHeader_Test.java | 90 +
.../http/classic/header/CacheControl_Test.java | 78 +
.../http/classic/header/ClientVersion_Test.java | 79 +
.../http/classic/header/Connection_Test.java | 91 +
.../classic/header/ContentDisposition_Test.java | 104 +
.../http/classic/header/ContentEncoding_Test.java | 78 +
.../http/classic/header/ContentLanguage_Test.java | 83 +
.../http/classic/header/ContentLength_Test.java | 83 +
.../http/classic/header/ContentLocation_Test.java | 84 +
.../http/classic/header/ContentRange_Test.java | 78 +
.../http/classic/header/ContentType_Test.java | 85 +
.../juneau/http/classic/header/Date_Test.java | 86 +
.../juneau/http/classic/header/Debug_Test.java | 79 +
.../juneau/http/classic/header/ETag_Test.java | 93 +
.../juneau/http/classic/header/Expect_Test.java | 78 +
.../juneau/http/classic/header/Expires_Test.java | 86 +
.../juneau/http/classic/header/Forwarded_Test.java | 78 +
.../juneau/http/classic/header/From_Test.java | 78 +
.../juneau/http/classic/header/Host_Test.java | 78 +
.../juneau/http/classic/header/IfMatch_Test.java | 84 +
.../http/classic/header/IfModifiedSince_Test.java | 86 +
.../http/classic/header/IfNoneMatch_Test.java | 84 +
.../juneau/http/classic/header/IfRange_Test.java | 104 +
.../classic/header/IfUnmodifiedSince_Test.java | 86 +
.../http/classic/header/LastModified_Test.java | 86 +
.../juneau/http/classic/header/Location_Test.java | 84 +
.../http/classic/header/MaxForwards_Test.java | 83 +
.../juneau/http/classic/header/NoTrace_Test.java | 83 +
.../juneau/http/classic/header/Origin_Test.java | 78 +
.../juneau/http/classic/header/Pragma_Test.java | 78 +
.../classic/header/ProxyAuthenticate_Test.java | 78 +
.../classic/header/ProxyAuthorization_Test.java | 78 +
.../juneau/http/classic/header/Range_Test.java | 78 +
.../juneau/http/classic/header/Referer_Test.java | 84 +
.../http/classic/header/RetryAfter_Test.java | 101 +
.../juneau/http/classic/header/Server_Test.java | 78 +
.../apache/juneau/http/classic/header/TE_Test.java | 84 +
.../juneau/http/classic/header/Trailer_Test.java | 78 +
.../http/classic/header/TransferEncoding_Test.java | 78 +
.../juneau/http/classic/header/Upgrade_Test.java | 82 +
.../juneau/http/classic/header/UserAgent_Test.java | 78 +
.../juneau/http/classic/header/Vary_Test.java | 78 +
.../juneau/http/classic/header/Via_Test.java | 83 +
.../juneau/http/classic/header/Warning_Test.java | 78 +
.../http/classic/header/WwwAuthenticate_Test.java | 78 +
.../http/classic/response/Accepted_Test.java | 55 +
.../classic/response/AlreadyReported_Test.java | 55 +
.../http/classic/response/BadRequest_Test.java | 136 ++
.../http/classic/response/Conflict_Test.java | 90 +
.../http/classic/response/Continue_Test.java | 55 +
.../juneau/http/classic/response/Created_Test.java | 55 +
.../http/classic/response/EarlyHints_Test.java | 55 +
.../classic/response/ExpectationFailed_Test.java | 90 +
.../classic/response/FailedDependency_Test.java | 90 +
.../http/classic/response/Forbidden_Test.java | 90 +
.../juneau/http/classic/response/Found_Test.java | 60 +
.../juneau/http/classic/response/Gone_Test.java | 90 +
.../http/classic/response/HttpException_Test.java | 232 ++
.../response/HttpVersionNotSupported_Test.java | 90 +
.../juneau/http/classic/response/IMUsed_Test.java | 55 +
.../classic/response/InsufficentStorage_Test.java | 90 +
.../classic/response/InternalServerError_Test.java | 90 +
.../http/classic/response/LengthRequired_Test.java | 90 +
.../juneau/http/classic/response/Locked_Test.java | 90 +
.../http/classic/response/LoopDetected_Test.java | 90 +
.../classic/response/MethodNotAllowed_Test.java | 90 +
.../classic/response/MisdirectedRequest_Test.java | 90 +
.../classic/response/MovedPermanently_Test.java | 60 +
.../http/classic/response/MultiStatus_Test.java | 55 +
.../classic/response/MultipleChoices_Test.java | 55 +
.../NetworkAuthenticationRequired_Test.java | 90 +
.../http/classic/response/NoContent_Test.java | 53 +
.../response/NonAuthoritativeInformation_Test.java | 55 +
.../http/classic/response/NotAcceptable_Test.java | 90 +
.../http/classic/response/NotExtended_Test.java | 90 +
.../http/classic/response/NotFound_Test.java | 90 +
.../http/classic/response/NotImplemented_Test.java | 90 +
.../http/classic/response/NotModified_Test.java | 53 +
.../juneau/http/classic/response/Ok_Test.java | 55 +
.../http/classic/response/PartialContent_Test.java | 55 +
.../classic/response/PayloadTooLarge_Test.java | 90 +
.../classic/response/PermanentRedirect_Test.java | 59 +
.../classic/response/PreconditionFailed_Test.java | 90 +
.../response/PreconditionRequired_Test.java | 90 +
.../http/classic/response/Processing_Test.java | 55 +
.../classic/response/RangeNotSatisfiable_Test.java | 90 +
.../response/RequestHeaderFieldsTooLarge_Test.java | 90 +
.../http/classic/response/ResetContent_Test.java | 53 +
.../http/classic/response/SeeOther_Test.java | 60 +
.../classic/response/ServiceUnavailable_Test.java | 90 +
.../classic/response/SwitchingProtocols_Test.java | 55 +
.../classic/response/TemporaryRedirect_Test.java | 60 +
.../classic/response/TooManyRequests_Test.java | 90 +
.../http/classic/response/Unauthorized_Test.java | 90 +
.../response/UnavailableForLegalReasons_Test.java | 90 +
.../classic/response/UnprocessableEntity_Test.java | 90 +
.../response/UnsupportedMediaType_Test.java | 90 +
.../classic/response/UpgradeRequired_Test.java | 90 +
.../http/classic/response/UriTooLong_Test.java | 90 +
.../http/classic/response/UseProxy_Test.java | 55 +
.../response/VariantAlsoNegotiates_Test.java | 90 +
.../http/remote/Remote_CommonInterfaces_Test.java | 864 +++++++
.../http/remote/Remote_ContentAnnotation_Test.java | 337 +++
.../remote/Remote_FormDataAnnotation_Test.java | 884 +++++++
.../http/remote/Remote_HeaderAnnotation_Test.java | 812 +++++++
.../Remote_MethodDefaultsAnnotation_Test.java | 382 +++
.../http/remote/Remote_PathAnnotation_Test.java | 721 ++++++
.../http/remote/Remote_QueryAnnotation_Test.java | 879 +++++++
.../remote/Remote_RemoteOpAnnotation_Test.java | 261 ++
.../http/remote/Remote_RequestAnnotation_Test.java | 296 +++
.../remote/Remote_ResponseAnnotation_Test.java | 138 ++
.../org/apache/juneau/http/remote/Remote_Test.java | 712 ++++++
.../juneau/http/remote/RrpcInterface_Test.java | 1779 ++++++++++++++
...sicHtmlDocTemplate_Navlink_RequestUri_Test.java | 5 +-
.../juneau/marshall/html/HtmlDocConfig_Test.java | 5 +-
.../org/apache/juneau/marshall/sse/Sse_Test.java | 741 ++++++
.../marshall/yaml/YamlBufferUnderflow_Test.java | 184 ++
.../rest/async/AsyncCompletionExecutor_Test.java | 328 +++
.../juneau/rest/client/RemoteClient_Test.java | 790 ++++++
.../client/RemoteProxy_FeatureParity_Test.java | 846 +++++++
.../rest/client/RestClientFeatures_Test.java | 6 +-
.../apache/juneau/rest/client/RestClient_Test.java | 792 ++++++
.../classic/BasicHttpRequestRetryHandler_Test.java | 59 +
.../client/classic/RestCallException_Test.java | 84 +
.../client/classic/RestClient_BasicCalls_Test.java | 399 ++++
.../rest/client/classic/RestClient_Body_Test.java | 189 ++
.../classic/RestClient_CallbackStrings_Test.java | 72 +
.../classic/RestClient_Config_Context_Test.java | 136 ++
.../RestClient_Config_MarshallingContext_Test.java | 10 +-
.../classic/RestClient_Config_OpenApi_Test.java | 89 +
.../classic/RestClient_Config_Parser_Test.java | 67 +
.../classic/RestClient_Config_RestClient_Test.java | 514 ++++
.../classic/RestClient_Config_Serializer_Test.java | 228 ++
.../client/classic/RestClient_FormData_Test.java | 175 ++
.../client/classic/RestClient_Headers_Test.java | 243 ++
.../RestClient_Logging_StreamClosed_Test.java | 248 ++
.../client/classic/RestClient_Logging_Test.java | 235 ++
.../client/classic/RestClient_Marshalls_Test.java | 186 ++
.../rest/client/classic/RestClient_Paths_Test.java | 98 +
.../rest/client/classic/RestClient_Query_Test.java | 151 ++
.../classic/RestClient_Response_Body_Test.java | 357 +++
.../classic/RestClient_Response_Headers_Test.java | 203 ++
.../client/classic/RestClient_Response_Test.java | 248 ++
.../rest/client/classic/RestClient_Test.java | 435 ++++
.../rest/mixin/MixinContext_BeanStore_Test.java | 83 +
.../rest/mixin/MixinContext_Construction_Test.java | 105 +
.../rest/mixin/MixinHooks_DestroyOrder_Test.java | 79 +
.../rest/mixin/MixinHooks_DualFire_Test.java | 86 +
.../mixin/MixinInheritance_CallLogger_Test.java | 122 +
.../mixin/MixinInheritance_Converters_Test.java | 103 +
.../mixin/MixinInheritance_DebugDefault_Test.java | 88 +
.../MixinInheritance_DebugEnablement_Test.java | 105 +
.../rest/mixin/MixinInheritance_Encoders_Test.java | 129 +
.../rest/mixin/MixinInheritance_Guards_Test.java | 103 +
.../rest/mixin/MixinInheritance_Messages_Test.java | 141 ++
.../mixin/MixinInheritance_NoInherit_Test.java | 91 +
.../rest/mixin/MixinInheritance_Parsers_Test.java | 123 +
.../mixin/MixinInheritance_PartParser_Test.java | 121 +
.../MixinInheritance_PartSerializer_Test.java | 121 +
.../MixinInheritance_ResponseProcessors_Test.java | 129 +
.../mixin/MixinInheritance_RestOpArgs_Test.java | 130 +
.../mixin/MixinInheritance_Serializers_Test.java | 103 +
.../mixin/MixinInheritance_VarResolver_Test.java | 63 +
.../mixin/MixinRouting_HostUnaffected_Test.java | 62 +
.../juneau/rest/mock/MockHttpSession_Test.java | 123 +
.../juneau/rest/mock/MockRestClient_Test.java | 309 +++
.../mock/MockRestClient_TestOverride_Test.java | 194 ++
.../juneau/rest/mock/MockServletRequest_Test.java | 372 +++
.../apache/juneau/rest/mock/PathResolverTest.java | 364 +++
.../mock/classic/MockRestClient_Coverage_Test.java | 236 ++
.../mock/classic/MockRestClient_PathVars_Test.java | 38 +-
.../rest/mock/classic/MockRestRequest_Test.java | 227 ++
.../apache/juneau/rest/mock2/MockLogger_Test.java | 138 ++
.../mock2/MockServletRequest_Coverage_Test.java | 515 ++++
.../juneau/rest/mock2/MockServletRequest_Test.java | 101 +
.../mock2/MockServletResponse_Coverage_Test.java | 183 ++
.../RestObservabilityAttributes_Test.java | 257 ++
.../observability/RestObservabilitySvl_Test.java | 134 ++
.../reactive/ReactiveOptIn_BareServer_Test.java | 8 +-
.../rest/server/AbstractRestBuilder_Test.java | 463 ++++
...BasicRestServletGroup_DynamicChildren_Test.java | 519 ++++
.../apache/juneau/rest/server/Content_Test.java | 991 ++++++++
.../apache/juneau/rest/server/FormData_Test.java | 321 +++
.../juneau/rest/server/HasFormData_Test.java | 55 +
.../apache/juneau/rest/server/HasQuery_Test.java | 77 +
.../rest/server/Header_AcceptCharset_Test.java | 91 +
.../rest/server/Header_AcceptEncoding_Test.java | 252 ++
.../juneau/rest/server/Header_Accept_Test.java | 250 ++
.../rest/server/Header_ContentType_Test.java | 213 ++
.../org/apache/juneau/rest/server/Header_Test.java | 319 +++
.../juneau/rest/server/LazyChildren_Test.java | 304 +++
.../rest/server/MarshalledConfig_Swaps_Test.java | 133 ++
.../org/apache/juneau/rest/server/Nls_Test.java | 102 +
.../apache/juneau/rest/server/NoInherit_Test.java | 4 +-
.../rest/server/OpSwaggerAnnotation_Test.java | 133 ++
.../juneau/rest/server/PathRemainder_Test.java | 289 +++
.../org/apache/juneau/rest/server/Path_Test.java | 880 +++++++
.../org/apache/juneau/rest/server/Paths_Test.java | 612 +++++
.../juneau/rest/server/ProblemMapper_Test.java | 354 +++
.../org/apache/juneau/rest/server/Query_Test.java | 5 +-
.../juneau/rest/server/ResponseHeader_Test.java | 251 ++
.../juneau/rest/server/ResponseStatus_Test.java | 37 +-
.../apache/juneau/rest/server/Response_Test.java | 5 +-
.../juneau/rest/server/RestAnnotation_Test.java | 274 +++
.../juneau/rest/server/RestBuilder_Test.java | 163 ++
.../RestContext_Args_OverridingParent_Test.java | 119 +
.../rest/server/RestContext_Builder_Test.java | 109 +
.../server/RestContext_Getters_Coverage_Test.java | 295 +++
.../rest/server/RestContext_Precedence_Test.java | 8 +-
.../server/RestContext_ValueAdoption_Test.java | 4 +-
.../RestContext_ValueAgainstConfig_Test.java | 375 +++
.../rest/server/RestDeleteAnnotation_Test.java | 182 ++
.../rest/server/RestDestroyAnnotation_Test.java | 97 +
.../rest/server/RestEndCallAnnotation_Test.java | 97 +
.../rest/server/RestEtag_RoundTrip_Test.java | 117 +
.../juneau/rest/server/RestGetAnnotation_Test.java | 196 ++
.../rest/server/RestInitAnnotation_Test.java | 100 +
.../apache/juneau/rest/server/RestInit_Test.java | 111 +
.../rest/server/RestInjectAnnotation_Test.java | 136 ++
.../juneau/rest/server/RestOpAnnotation_Test.java | 221 ++
.../RestOpContext_HttpMethodResolution_Test.java | 119 +
.../RestOpContext_OpLevelOverrides_Test.java | 88 +
...estOpContext_PathMatcher_CompiledForm_Test.java | 93 +
.../server/RestOpContext_SvlInOpPath_Test.java | 189 ++
.../juneau/rest/server/RestOpInvoker_Test.java | 711 ++++++
.../rest/server/RestOp_ClientVersion_Test.java | 196 ++
.../juneau/rest/server/RestOp_Guards_Test.java | 208 ++
.../rest/server/RestOp_MarshalledConfig_Test.java | 297 +++
.../juneau/rest/server/RestOp_Matchers_Test.java | 84 +
.../juneau/rest/server/RestOp_Params_Test.java | 379 +++
.../juneau/rest/server/RestOp_ReqHeaders_Test.java | 118 +
.../juneau/rest/server/RestOp_Returns_Test.java | 181 ++
.../juneau/rest/server/RestOp_Throws_Test.java | 879 +++++++
.../rest/server/RestOptionsAnnotation_Test.java | 215 ++
.../rest/server/RestPatchAnnotation_Test.java | 236 ++
.../RestPathsRuntimeOverride_CommaSplit_Test.java | 175 ++
...RestPathsRuntimeOverride_GetterShapes_Test.java | 343 +++
.../RestPathsRuntimeOverride_Getter_Test.java | 112 +
...RestPathsRuntimeOverride_Programmatic_Test.java | 82 +
.../server/RestPathsRuntimeOverride_SVL_Test.java | 213 ++
.../rest/server/RestPostAnnotation_Test.java | 217 ++
.../rest/server/RestPostCallAnnotation_Test.java | 97 +
.../juneau/rest/server/RestPostCall_Test.java | 80 +
.../rest/server/RestPostInitAnnotation_Test.java | 101 +
.../juneau/rest/server/RestPostInit_Test.java | 211 ++
.../rest/server/RestPreCallAnnotation_Test.java | 97 +
.../juneau/rest/server/RestPreCall_Test.java | 82 +
.../juneau/rest/server/RestPutAnnotation_Test.java | 217 ++
.../RestRequest_CheckPreconditions_Test.java | 337 +++
.../rest/server/RestRequest_Coverage_Test.java | 4 +-
.../server/RestRequest_SessionProperties_Test.java | 160 ++
.../rest/server/RestResponse_DownloadAs_Test.java | 34 +-
.../rest/server/RestResponse_EtagHelpers_Test.java | 368 +++
.../server/RestResponse_SetSerializer_Test.java | 73 +
.../juneau/rest/server/RestResponse_Test.java | 697 ++++++
.../rest/server/RestStartCallAnnotation_Test.java | 97 +
.../juneau/rest/server/RestStartCall_Test.java | 81 +
.../rest/server/Rest_AllowContentParam_Test.java | 71 +
.../rest/server/Rest_AllowedHeaderParams_Test.java | 108 +
.../server/Rest_AllowedMethodHeaders_Test.java | 132 +
.../rest/server/Rest_AllowedMethodParams_Test.java | 195 ++
.../server/Rest_AnnotationInheritance_Test.java | 63 +
.../server/Rest_BeanCreatorOverrides_Test.java | 150 ++
.../apache/juneau/rest/server/Rest_Debug_Test.java | 7 +-
.../server/Rest_DefaultRequestAttributes_Test.java | 185 ++
.../juneau/rest/server/Rest_Encoders_Test.java | 96 +
.../juneau/rest/server/Rest_Messages_Test.java | 131 +
.../rest/server/Rest_Mixins_Conflicts_Test.java | 51 +
.../juneau/rest/server/Rest_Mixins_Test.java | 81 +
.../server/Rest_PredefinedStatusCodes_Test.java | 238 ++
.../server/Rest_ProblemDetails_OptIn_Test.java | 152 ++
.../server/Rest_ProblemDetails_PerOp_Test.java | 324 +++
.../apache/juneau/rest/server/Rest_RVars_Test.java | 83 +
.../rest/server/Rest_SseBroadcaster_IT_Test.java | 55 +
.../juneau/rest/server/Restx_Parsers_Test.java | 185 ++
.../apache/juneau/rest/server/Restx_Path_Test.java | 147 ++
.../juneau/rest/server/Restx_ReqAttrs_Test.java | 167 ++
.../juneau/rest/server/Restx_RoleGuard_Test.java | 1018 ++++++++
.../juneau/rest/server/Restx_Serializers_Test.java | 178 ++
.../rest/server/Settings_NoLeakedSources_Test.java | 137 ++
.../StackOverlay_RestContext_Spike_Test.java | 7 +-
.../juneau/rest/server/SwaggerAnnotation_Test.java | 123 +
.../juneau/rest/server/Swagger_Body_Test.java | 245 ++
.../juneau/rest/server/Swagger_FormData_Test.java | 234 ++
.../juneau/rest/server/Swagger_Header_Test.java | 227 ++
.../juneau/rest/server/Swagger_Path_Test.java | 278 +++
.../juneau/rest/server/Swagger_Query_Test.java | 202 ++
.../juneau/rest/server/Swagger_Response_Test.java | 347 +++
.../rest/server/Swagger_RestOp_Parameters.java | 233 ++
.../apache/juneau/rest/server/Swagger_Test.java | 1875 +++++++++++++++
.../rest/server/VirtualThreadDispatch_Test.java | 230 ++
.../juneau/rest/server/arg/ArgException_Test.java | 88 +
.../server/assertions/RestAssertions_Test.java | 364 +++
.../juneau/rest/server/auth/ApiKeyGuard_Test.java | 6 +-
.../juneau/rest/server/auth/AuthArg_Test.java | 170 ++
.../AuthFilterChain_GuardIntegration_Test.java | 11 +-
.../juneau/rest/server/auth/AuthFilter_Test.java | 258 ++
.../rest/server/auth/BearerTokenGuard_Test.java | 6 +-
.../rest/server/beans/BeanDescription_Test.java | 114 +
.../beans/ChildResourceDescriptions_Test.java | 91 +
.../juneau/rest/server/beans/Hyperlink_Test.java | 67 +
.../server/beans/ResourceDescription_Test.java | 25 +-
.../rest/server/beans/SeeOtherRoot_Test.java | 80 +
.../convention/BasicConvention_Builders_Test.java | 370 +++
.../BasicConvention_OpenApiHidden_Test.java | 108 +
.../BasicConvention_ParentChain_Test.java | 141 ++
.../convention/FaviconMixin_AsMixin_Test.java | 141 ++
.../server/convention/FaviconResource_Test.java | 70 +
.../server/convention/FaviconServlet_Test.java | 92 +
.../server/convention/SeoMixin_AsMixin_Test.java | 130 +
.../convention/VersionMixin_AsMixin_Test.java | 154 ++
.../VersionMixin_SvlPathOverride_Test.java | 186 ++
.../VersionMixin_ValueAdoption_Test.java | 76 +
.../server/convention/VersionResource_Test.java | 72 +
.../server/convention/VersionServlet_Test.java | 83 +
.../convention/WellKnownMixin_AsMixin_Test.java | 82 +
.../rest/server/converter/RestConverter_Test.java | 211 ++
.../juneau/rest/server/debug/DebugConfig_Test.java | 359 +++
.../rest/server/debug/DebugEnablement_Test.java | 487 ++++
.../juneau/rest/server/debug/DebugRule_Test.java | 169 ++
.../rest/server/docs/BasicApiDocsTestFixtures.java | 150 ++
.../server/docs/BasicApiDocs_ParentChain_Test.java | 102 +
.../docs/BasicApiDocs_TransitiveDedupe_Test.java | 109 +
.../server/docs/OpenApiMixin_AsMixin_Test.java | 96 +
.../docs/OpenApiMixin_SvlPathOverride_Test.java | 188 ++
.../rest/server/docs/RedocMixin_AsMixin_Test.java | 98 +
.../docs/RedocMixin_SvlPathOverride_Test.java | 174 ++
.../server/docs/SwaggerMixin_AsMixin_Test.java | 75 +
.../server/docs/SwaggerMixin_Standalone_Test.java | 62 +
.../docs/SwaggerMixin_SvlPathOverride_Test.java | 178 ++
.../server/docs/SwaggerUiMixin_AsMixin_Test.java | 86 +
.../docs/SwaggerUiMixin_SvlPathOverride_Test.java | 175 ++
.../server/filter/RequestIdFilter_Echo_Test.java | 61 +
.../server/filter/RequestIdFilter_Honor_Test.java | 61 +
.../filter/RequestIdFilter_Malformed_Test.java | 175 ++
.../rest/server/filter/RequestIdFilter_Test.java | 5 +-
.../guard/RateLimitGuard_AdvisoryHeaders_Test.java | 91 +
.../server/guard/RateLimitGuard_Eviction_Test.java | 117 +
.../guard/RateLimitGuard_ExemptPaths_Test.java | 126 +
.../guard/RateLimitGuard_KeyIsolation_Test.java | 96 +
.../server/guard/RateLimitGuard_Snapshot_Test.java | 4 +-
.../rest/server/guard/RateLimitGuard_Test.java | 5 +-
.../guard/RateLimitGuard_XForwardedFor_Test.java | 102 +
.../juneau/rest/server/guard/RoleMatcher_Test.java | 300 +++
.../rest/server/health/HealthIndicator_Test.java | 45 +
.../rest/server/health/HealthMixin_Test.java | 64 +
.../rest/server/health/HealthResource_Test.java | 97 +
.../rest/server/health/HealthServlet_Test.java | 72 +
.../server/httppart/RequestAttributes_Test.java | 219 ++
.../server/httppart/RequestFormParamList_Test.java | 457 ++++
.../RequestHttpPart_FluentSetters_Test.java | 93 +
.../server/httppart/RequestPathParamList_Test.java | 452 ++++
.../httppart/RequestQueryParamList_Test.java | 471 ++++
.../logger/CallLogger_ValueAdoption_Test.java | 163 ++
.../openapi/BasicOpenApiProviderSession_Test.java | 737 ++++++
.../server/openapi/OpenApiSchemaReuse_Test.java | 185 ++
.../server/openapi/OpenApiYamlRoundTrip_Test.java | 158 ++
.../rest/server/ops/AdminMixin_AsMixin_Test.java | 5 +-
.../ops/AdminMixin_AuthIntegration_Test.java | 142 ++
.../ops/AdminMixin_RateLimitSnapshot_Test.java | 259 ++
.../ops/AdminMixin_SvlPathOverride_Test.java | 195 ++
.../juneau/rest/server/ops/AdminResource_Test.java | 92 +
.../juneau/rest/server/ops/AdminServlet_Test.java | 130 +
.../server/ops/BasicOps_OpenApiHidden_Test.java | 105 +
.../rest/server/ops/BasicOps_ParentChain_Test.java | 127 +
.../rest/server/ops/EchoMixin_AsMixin_Test.java | 5 +-
.../server/ops/EchoMixin_SvlPathOverride_Test.java | 208 ++
.../server/ops/MixinHtmlDocInheritance_Test.java | 5 +-
.../server/ops/NavigationMixin_AsMixin_Test.java | 65 +
.../server/ops/RouteIndexMixin_AsMixin_Test.java | 11 +-
.../RouteIndexMixin_ContentNegotiation_Test.java | 104 +
.../ops/RouteIndexMixin_SvlPathOverride_Test.java | 194 ++
.../processor/AsyncResponseProcessor_Test.java | 384 +++
.../processor/CatchAllResponseProcessor_Test.java | 103 +
.../server/processor/MdcAsyncListener_Test.java | 217 ++
.../processor/ProblemDetailsProcessor_Test.java | 210 ++
.../processor/ResponseBeanProcessor_Test.java | 5 +-
.../rest/server/remote/RrpcServlet_Test.java | 4 +-
.../rest/server/rrpc/RrpcRestOpSession_Test.java | 54 +
...JuneauRestServletContainerInitializer_Test.java | 85 +
.../server/servlet/RestMixin_HostContext_Test.java | 107 +
.../rest/server/servlet/RestServlet_Test.java | 381 +++
.../rest/server/sse/SseBroadcaster_Test.java | 59 +
.../juneau/rest/server/sse/SseHeartbeat_Test.java | 36 +-
.../rest/server/sse/SseResponseSupport_Test.java | 55 +
.../staticfile/StaticFilesMixin_AsMixin_Test.java | 110 +
.../StaticFilesMixin_CacheControl_Test.java | 80 +
.../StaticFilesMixin_ImporterOverride_Test.java | 77 +
.../StaticFilesMixin_OpenApiHidden_Test.java | 134 ++
.../StaticFilesMixin_Standalone_Test.java | 73 +
.../StaticFilesMixin_SvlPathOverride_Test.java | 205 ++
.../staticfile/StaticFilesResource_Test.java | 74 +
.../server/staticfile/StaticFilesServlet_Test.java | 80 +
.../BasicSwaggerProviderSession_Coverage_Test.java | 574 +++++
.../util/BoundedServletInputStream_Test.java | 261 ++
.../juneau/rest/server/util/RestUtils_Test.java | 470 ++++
.../rest/server/util/UrlPathMatcher_Test.java | 360 +++
.../rest/server/vars/RequestSwaggerVar_Test.java | 408 ++++
.../juneau/rest/server/vars/RestVars_Test.java | 290 +++
.../rest/server/widget/MenuItemWidget_Test.java | 4 +-
.../juneau/rest/server/widget/RestWidget_Test.java | 229 ++
.../rest/test/client/ThirdPartyProxyResource.java | 1771 ++++++++++++++
.../rest/test/client/ThirdPartyProxy_Test.java | 2524 ++++++++++++++++++++
.../juneau/rest/validation/BeanValidator_Test.java | 5 +-
.../validation/RestValidation_Content_Test.java | 244 ++
.../RestValidation_CustomValidator_Test.java | 111 +
.../RestValidation_MissingProvider_Test.java | 96 +
.../validation/RestValidation_Nested_Test.java | 142 ++
.../RestValidation_OffByDefault_Test.java | 152 ++
.../RestValidation_ProblemDetails_Test.java | 129 +
.../org/apache/juneau/testutils/pojos/ABean.java | 26 +-
.../testutils/pojos/ImplicitSwappedObject.java | 28 +-
.../juneau/testutils/pojos/SwappedObject.java | 14 +-
.../juneau/testutils/pojos/SwappedObjectSwap.java | 30 +-
.../org/apache/juneau/testutils/pojos/TestURI.java | 69 +
.../apache/juneau/testutils/pojos/TypedBean.java | 6 +-
.../juneau/testutils/pojos/TypedBeanImpl.java | 28 +-
.../org/apache/juneau/testutils/pojos/XBeans.java | 270 +++
.../juneau/utest/utils/FakeReaderParser.java | 50 +-
.../juneau/utest/utils/FakeStreamParser.java | 3 +
.../juneau/utest/utils/FakeStreamSerializer.java | 1 +
.../juneau/utest/utils/FakeWriterSerializer.java | 1 +
.../beans/factory/annotation/Autowired.java | 23 +-
.../juneau/rest/mixin/HostMessages.properties | 16 +
.../juneau/rest/mixin/MixinMessages.properties | 16 +
.../org/apache/juneau/rest/server/A1.properties | 16 +
.../org/apache/juneau/rest/server/A2.properties | 16 +
.../org/apache/juneau/rest/server/B1x.properties | 16 +
.../org/apache/juneau/rest/server/B2x.properties | 16 +
.../server/BasicRestInfoProviderTest.properties | 19 +
.../apache/juneau/rest/server/NlsTest.properties | 16 +
.../swagger/BasicRestInfoProviderTest_swagger.json | 171 ++
juneau-rest/juneau-rest-server-auth-jwt/pom.xml | 18 +
.../rest/server/auth/jwt/JwksCache_Test.java | 4 +-
.../rest/server/auth/jwt/JwtTestSupport.java | 146 ++
.../auth/jwt/JwtTokenValidator_Builder_Test.java | 4 +-
.../JwtTokenValidator_ClaimValidation_Test.java | 181 ++
.../JwtTokenValidator_ClaimsPrincipal_Test.java | 74 +
.../auth/jwt/JwtTokenValidator_HappyPath_Test.java | 69 +
.../auth/jwt/JwtTokenValidator_Security_Test.java | 4 +-
.../jwt/JwtTokenValidator_ValueAdoption_Test.java | 102 +
juneau-rest/juneau-rest-server-auth-oauth/pom.xml | 24 +
.../auth/oauth/BoundedLruTokenCache_Test.java | 4 +-
.../rest/server/auth/oauth/OAuthFilter_Test.java | 130 +
.../server/auth/oauth/OAuthFlowBuilder_Test.java | 12 +-
.../OAuthIntrospectionValidator_Builder_Test.java | 4 +-
.../OAuthIntrospectionValidator_Cache_Test.java | 65 +
.../rest/server/auth/oauth/OAuthToken_Test.java | 4 +-
.../oauth/OidcDiscoveryClient_Builder_Test.java | 4 +-
.../juneau-rest-server-auth-oidc-rp/pom.xml | 24 +
.../server/auth/oidc/rp/EphemeralStore_Test.java | 4 +-
.../auth/oidc/rp/IdTokenValidatorAdapter_Test.java | 4 +-
.../auth/oidc/rp/InMemorySessionStore_Test.java | 113 +
.../server/auth/oidc/rp/OidcRelyingParty_Test.java | 292 +++
.../rest/server/auth/oidc/rp/OidcTestSupport.java | 232 ++
.../oidc/rp/SignedCookieSessionStore_Test.java | 4 +-
juneau-rest/juneau-rest-server-auth-saml/pom.xml | 24 +
.../saml/SamlAssertionValidator_Builder_Test.java | 4 +-
...AssertionValidator_EncryptedAssertion_Test.java | 99 +
.../SamlAssertionValidator_HappyPath_Test.java | 128 +
.../rest/server/auth/saml/SamlAuthFilter_Test.java | 4 +-
.../rest/server/auth/saml/SamlBinding_Test.java | 21 +-
.../rest/server/auth/saml/SamlTestSupport.java | 4 +-
juneau-rest/juneau-rest-server-mcp/pom.xml | 30 +
.../juneau/rest/server/mcp/McpCursor_Test.java | 116 +
.../juneau/rest/server/mcp/McpDispatcher_Test.java | 351 +++
.../rest/server/mcp/McpHandlerDefaults_Test.java | 107 +
.../rest/server/mcp/McpRestServlet_Test.java | 170 ++
.../rest/server/mcp/McpServerConfig_Test.java | 136 ++
.../rest/server/mcp/McpTypedHandlers_Test.java | 289 +++
.../juneau-rest-server-metrics-micrometer/pom.xml | 24 +
.../metrics/MetricsRecorder_Contract_Test.java | 184 ++
.../juneau-rest-server-reactive-reactor/pom.xml | 24 +
.../rest/server/reactive/ReactiveBridge_Test.java | 192 ++
juneau-rest/juneau-rest-server-reactive/pom.xml | 24 +
.../reactive/ReactiveResponseProcessor_Test.java | 250 ++
juneau-rest/juneau-rest-server-springboot/pom.xml | 30 +
.../convention/VersionMixin_Springboot_Test.java | 140 ++
.../rest/server/docs/BasicApiDocsTestFixtures.java | 150 ++
...iDocs_Springboot_MultiOpenApiProvider_Test.java | 5 +-
.../server/docs/BasicApiDocs_Springboot_Test.java | 144 ++
.../juneau/rest/server/logger/CallLogger_Test.java | 408 ++++
.../juneau/rest/server/logger/RestLogger_Test.java | 351 +++
.../rest/server/ops/EchoMixin_Springboot_Test.java | 121 +
.../JuneauRestAutoConfiguration_Test.java | 112 +
.../JuneauServletRegistrations_Test.java | 4 +-
.../RestPathsRuntimeOverride_Springboot_Test.java | 172 ++
.../server/springboot/SpringBeanStore_Test.java | 792 ++++++
...tPropertySource_SpringbootIntegration_Test.java | 142 ++
.../SpringEnvironmentPropertySource_Test.java | 240 ++
.../StaticFilesMixin_SpringbootMetaInf_Test.java | 141 ++
.../StaticFilesMixin_Springboot_Test.java | 158 ++
.../juneau/testing/annotations/SpringbootTest.java | 22 +-
.../META-INF/resources/spring-fixture.txt | 13 +
.../juneau-rest-server-tracing-otel/pom.xml | 42 +
.../TraceContextResponseProcessor_Test.java | 201 ++
.../server/tracing/TracerHook_Contract_Test.java | 169 ++
.../server/tracing/otel/OtelTracerHook_Test.java | 4 +-
.../otel/RestRequestTextMapGetter_Test.java | 98 +
.../juneau-rest-server-view-freemarker/pom.xml | 24 +
.../freemarker/FreemarkerMixin_Builder_Test.java | 238 ++
.../freemarker/FreemarkerMixin_MockRest_Test.java | 149 ++
.../FreemarkerMixin_PathTraversal_Test.java | 109 +
.../FreemarkerMixin_SvlPathOverride_Test.java | 66 +
.../freemarker/FreemarkerViewRenderer_Test.java | 53 +
.../view/freemarker/FreemarkerView_Test.java | 4 +-
.../test/resources/freemarker-templates/about.ftlh | 22 +
.../test/resources/freemarker-templates/hello.ftlh | 22 +
.../freemarker-templates/nested/inner.ftlh | 22 +
juneau-rest/juneau-rest-server-view-jsp/pom.xml | 24 +
.../server/view/jsp/JspMixin_Builder_Test.java | 74 +
.../server/view/jsp/JspMixin_MockRest_Test.java | 83 +
.../view/jsp/JspMixin_PathTraversal_Test.java | 1 -
.../view/jsp/JspMixin_SvlPathOverride_Test.java | 172 ++
.../server/view/jsp/JspServlet_MockRest_Test.java | 46 +
.../rest/server/view/jsp/JspViewRenderer_Test.java | 100 +
.../juneau/rest/server/view/jsp/JspView_Test.java | 1 -
.../juneau-rest-server-view-mustache/pom.xml | 24 +
.../view/mustache/MustacheMixin_Builder_Test.java | 222 ++
.../view/mustache/MustacheMixin_MockRest_Test.java | 135 ++
.../mustache/MustacheMixin_PathTraversal_Test.java | 102 +
.../MustacheMixin_SvlPathOverride_Test.java | 66 +
.../view/mustache/MustacheViewRenderer_Test.java | 51 +
.../server/view/mustache/MustacheView_Test.java | 4 +-
.../resources/mustache-templates/about.mustache | 16 +
.../resources/mustache-templates/hello.mustache | 15 +
.../mustache-templates/nested/inner.mustache | 15 +
.../juneau-rest-server-view-thymeleaf/pom.xml | 30 +
.../thymeleaf/ThymeleafMixin_Builder_Test.java | 175 ++
.../thymeleaf/ThymeleafMixin_MockRest_Test.java | 132 +
.../ThymeleafMixin_PathTraversal_Test.java | 98 +
.../ThymeleafMixin_SvlPathOverride_Test.java | 66 +
.../view/thymeleaf/ThymeleafViewRenderer_Test.java | 99 +
.../server/view/thymeleaf/ThymeleafView_Test.java | 4 +-
.../src/test/resources/templates/about.html | 24 +
.../src/test/resources/templates/hello.html | 23 +
.../src/test/resources/templates/nested/inner.html | 23 +
juneau-rest/juneau-rest-server/pom.xml | 30 +
.../rest/server/auth/ApiKeyAuthFilter_Test.java | 4 +-
.../rest/server/auth/AuthFilterChain_Test.java | 273 +++
.../juneau/rest/server/auth/AuthResult_Test.java | 4 +-
.../auth/AuthenticatedRequestWrapper_Test.java | 100 +
.../server/auth/AuthenticationException_Test.java | 75 +
.../server/auth/BearerTokenAuthFilter_Test.java | 150 ++
.../rest/server/auth/ClaimsPrincipal_Test.java | 4 +-
.../rest/server/stats/MethodExecStore_Test.java | 186 ++
.../juneau/rest/server/stats/ThrownStore_Test.java | 369 +++
.../apache/juneau/rest/server/view/View_Test.java | 4 +-
.../server/config/repository/GitControl.java | 5 +-
.../java/org/apache/juneau/BeanStreaming_Test.java | 5 +-
.../MarshallingContext_ValidateSchema_Test.java | 4 +-
.../java/org/apache/juneau/MaxIndent_Test.java | 4 +-
.../org/apache/juneau/ParserGenerics_Test.java | 4 +-
.../src/test/java/org/apache/juneau/a/A1.java | 4 +-
.../a/rttests/ObjectsAsStrings_RoundTripTest.java | 4 +-
.../juneau/a/rttests/RoundTripBeanMaps_Test.java | 4 +-
.../a/rttests/RoundTripLargeObjects_Test.java | 4 +-
.../juneau/commons/reflect/ClassInfo_Test.java | 5 +-
.../java/org/apache/juneau/cp/FileFinder_Test.java | 2 +-
.../apache/juneau/encoders/EncoderSet_Test.java | 4 +-
.../juneau/httppart/bean/MethodInfoUtils_Test.java | 4 +-
.../juneau/junit/bct/BasicBeanConverter_Test.java | 4 +-
.../junit5/JuneauBeanStoreExtension_Test.java | 4 +-
.../apache/juneau/junit5/TestBeanStore_Test.java | 4 +-
.../juneau/markdown/MarkdownDocParser_Test.java | 4 +-
.../markdown/MarkdownParserSession_Test.java | 60 +-
.../juneau/markdown/MarkdownParser_Test.java | 36 +-
.../juneau/markdown/MarkdownSerializer_Test.java | 12 +-
.../MarshalledPropertyPostProcessor_Test.java | 4 +-
.../juneau/marshall/bson/BsonInputStream_Test.java | 4 +-
.../juneau/marshall/hjson/HjsonEdgeCases_Test.java | 4 +-
.../juneau/marshall/hjson/HjsonMediaType_Test.java | 4 +-
.../juneau/marshall/hjson/HjsonParser_Test.java | 4 +-
.../juneau/marshall/hocon/HoconEdgeCases_Test.java | 4 +-
.../juneau/marshall/hocon/HoconMediaType_Test.java | 4 +-
.../juneau/marshall/hocon/HoconMerging_Test.java | 4 +-
.../marshall/hocon/HoconParserSession_Test.java | 4 +-
.../juneau/marshall/hocon/HoconPath_Test.java | 4 +-
.../marshall/hocon/HoconSubstitution_Test.java | 4 +-
...sicHtmlDocTemplate_Navlink_RequestUri_Test.java | 4 +-
.../juneau/marshall/html/BasicHtml_Test.java | 5 +-
.../juneau/marshall/html/HtmlDocConfig_Test.java | 4 +-
.../apache/juneau/marshall/ini/IniParser_Test.java | 4 +-
.../org/apache/juneau/marshall/json/Json_Test.java | 4 +-
.../marshall/objecttools/ObjectRest_Test.java | 6 +-
.../juneau/marshall/parser/ParserSet_Test.java | 4 +-
.../proto/ProtoSerializerSession_Test.java | 12 +-
.../marshall/serializer/SerializerSet_Test.java | 4 +-
.../org/apache/juneau/marshall/toml/Toml_Test.java | 8 +-
.../marshall/transforms/CalendarFormat_Test.java | 4 +-
.../marshall/transforms/DateFormat_Test.java | 4 +-
.../juneau/marshall/transforms/ObjectSwapTest.java | 4 +-
.../marshall/transforms/TemporalFormat_Test.java | 4 +-
.../apache/juneau/marshall/xml/BasicXml_Test.java | 4 +-
.../org/apache/juneau/marshall/xml/Xml_Test.java | 4 +-
.../org/apache/juneau/marshaller/Hjson_Test.java | 4 +-
.../org/apache/juneau/marshaller/Hocon_Test.java | 4 +-
.../observability/ObservabilityNoopBenchmark.java | 4 +-
.../juneau/microservice/BootTimeBenchmark.java | 2 +-
.../microservice/Microservice_Builder_Test.java | 4 +-
.../microservice/Microservice_Lifecycle_Test.java | 4 +-
.../rest/client/RemoteInterfaceTransport_Test.java | 4 +-
.../rest/client/RestClientFeatures_Test.java | 4 +-
.../RestClient_Config_MarshallingContext_Test.java | 5 +-
.../apache/juneau/rest/server/NoInherit_Test.java | 4 +-
.../org/apache/juneau/rest/server/Query_Test.java | 4 +-
.../apache/juneau/rest/server/Response_Test.java | 4 +-
.../rest/server/RestContext_Precedence_Test.java | 4 +-
.../server/RestContext_ValueAdoption_Test.java | 4 +-
.../rest/server/RestRequest_Coverage_Test.java | 4 +-
.../apache/juneau/rest/server/Rest_Debug_Test.java | 4 +-
.../StackOverlay_RestContext_Spike_Test.java | 4 +-
.../rest/server/auth/ApiKeyAuthFilter_Test.java | 4 +-
.../juneau/rest/server/auth/ApiKeyGuard_Test.java | 4 +-
.../AuthFilterChain_GuardIntegration_Test.java | 8 +-
.../juneau/rest/server/auth/AuthResult_Test.java | 4 +-
.../rest/server/auth/BearerTokenGuard_Test.java | 4 +-
.../rest/server/auth/ClaimsPrincipal_Test.java | 4 +-
.../rest/server/auth/jwt/JwksCache_Test.java | 4 +-
.../auth/jwt/JwtTokenValidator_Builder_Test.java | 4 +-
.../auth/jwt/JwtTokenValidator_Security_Test.java | 4 +-
.../auth/oauth/BoundedLruTokenCache_Test.java | 4 +-
.../server/auth/oauth/OAuthFlowBuilder_Test.java | 12 +-
.../OAuthIntrospectionValidator_Builder_Test.java | 4 +-
.../rest/server/auth/oauth/OAuthToken_Test.java | 4 +-
.../oauth/OidcDiscoveryClient_Builder_Test.java | 4 +-
.../server/auth/oidc/rp/EphemeralStore_Test.java | 4 +-
.../auth/oidc/rp/IdTokenValidatorAdapter_Test.java | 4 +-
.../oidc/rp/SignedCookieSessionStore_Test.java | 4 +-
.../saml/SamlAssertionValidator_Builder_Test.java | 4 +-
.../rest/server/auth/saml/SamlAuthFilter_Test.java | 4 +-
.../rest/server/auth/saml/SamlTestSupport.java | 4 +-
...iDocs_Springboot_MultiOpenApiProvider_Test.java | 4 +-
.../rest/server/filter/RequestIdFilter_Test.java | 4 +-
.../server/guard/RateLimitGuard_Snapshot_Test.java | 4 +-
.../rest/server/guard/RateLimitGuard_Test.java | 4 +-
.../rest/server/ops/AdminMixin_AsMixin_Test.java | 4 +-
.../rest/server/ops/EchoMixin_AsMixin_Test.java | 4 +-
.../server/ops/MixinHtmlDocInheritance_Test.java | 4 +-
.../server/ops/RouteIndexMixin_AsMixin_Test.java | 8 +-
.../processor/ResponseBeanProcessor_Test.java | 4 +-
.../rest/server/remote/RrpcServlet_Test.java | 4 +-
.../JuneauServletRegistrations_Test.java | 4 +-
.../server/tracing/otel/OtelTracerHook_Test.java | 4 +-
.../apache/juneau/rest/server/view/View_Test.java | 4 +-
.../view/freemarker/FreemarkerView_Test.java | 4 +-
.../view/jsp/JspMixin_PathTraversal_Test.java | 4 +-
.../juneau/rest/server/view/jsp/JspView_Test.java | 4 +-
.../server/view/mustache/MustacheView_Test.java | 4 +-
.../server/view/thymeleaf/ThymeleafView_Test.java | 4 +-
.../rest/server/widget/MenuItemWidget_Test.java | 4 +-
.../juneau/rest/validation/BeanValidator_Test.java | 4 +-
juneau-utest/test-run-history.tsv | 1 +
1374 files changed, 127071 insertions(+), 1008 deletions(-)
diff --git a/juneau-bean/juneau-bean-atom/src/test/java/org/apache/juneau/TestUtils.java b/juneau-bean/juneau-bean-atom/src/test/java/org/apache/juneau/TestUtils.java
index 53f16cac0e..997cf72f06 100644
--- a/juneau-bean/juneau-bean-atom/src/test/java/org/apache/juneau/TestUtils.java
+++ b/juneau-bean/juneau-bean-atom/src/test/java/org/apache/juneau/TestUtils.java
@@ -31,7 +31,6 @@ import java.util.stream.*;
import org.apache.juneau.commons.bean.*;
import org.apache.juneau.commons.utils.*;
-import org.apache.juneau.junit.bct.*;
import org.apache.juneau.marshall.serializer.*;
import org.apache.juneau.marshall.xml.*;
import org.junit.jupiter.api.*;
@@ -69,6 +68,9 @@ public class TestUtils extends Utils {
assertEquals(expected, s.toString(actual));
}
+ @SuppressWarnings({
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+ })
public static <T extends Throwable> T assertThrowable(Class<? extends Throwable> expectedType, String expectedSubstring, T t) {
var messages = getMessages(t);
assertTrue(messages.contains(expectedSubstring), fs("Expected message to contain: {0}.\nActual:\n{1}", expectedSubstring, messages));
@@ -92,7 +94,9 @@ public class TestUtils extends Utils {
/**
* Validates that the whitespace is correct in the specified XML.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void checkXmlWhitespace(String out) throws Exception {
if (out.indexOf('\u0000') != -1) {
for (var s : out.split("\u0000"))
@@ -265,7 +269,9 @@ public class TestUtils extends Utils {
/**
* Validates XML whitespace and namespace formatting on a serialized object.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void validateXml(Object o) throws Exception {
validateXml(o, XmlSerializer.DEFAULT_NS_SQ);
}
@@ -273,7 +279,9 @@ public class TestUtils extends Utils {
/**
* Validates XML whitespace and namespace formatting on a serialized object.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void validateXml(Object o, XmlSerializer s) throws Exception {
s = s.copy().ws().ns().addNamespaceUrisToRoot().build();
var xml = s.serialize(o);
@@ -287,6 +295,9 @@ public class TestUtils extends Utils {
/**
* Extracts HTML/XML elements from a string based on element name and attributes.
*/
+ @SuppressWarnings({
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+ })
public static List<String> extractXml(String html, String elementName, Map<String,String> withAttributes) {
List<String> results = list();
if (html == null || elementName == null)
@@ -303,7 +314,7 @@ public class TestUtils extends Utils {
if (tagEnd == -1) break;
var tag = html.substring(i, tagEnd + 1);
var matches = withAttributes == null || withAttributes.isEmpty();
- if (!matches) {
+ if (!matches && withAttributes != null) {
matches = true;
for (var entry : withAttributes.entrySet()) {
if (!tag.contains(entry.getKey() + "=\"" + entry.getValue() + "\"") && !tag.contains(entry.getKey() + "='" + entry.getValue() + "'")) {
diff --git a/juneau-bean/juneau-bean-common/src/test/java/org/apache/juneau/TestUtils.java b/juneau-bean/juneau-bean-common/src/test/java/org/apache/juneau/TestUtils.java
index 53f16cac0e..6e7005f7ab 100644
--- a/juneau-bean/juneau-bean-common/src/test/java/org/apache/juneau/TestUtils.java
+++ b/juneau-bean/juneau-bean-common/src/test/java/org/apache/juneau/TestUtils.java
@@ -31,7 +31,6 @@ import java.util.stream.*;
import org.apache.juneau.commons.bean.*;
import org.apache.juneau.commons.utils.*;
-import org.apache.juneau.junit.bct.*;
import org.apache.juneau.marshall.serializer.*;
import org.apache.juneau.marshall.xml.*;
import org.junit.jupiter.api.*;
@@ -92,7 +91,9 @@ public class TestUtils extends Utils {
/**
* Validates that the whitespace is correct in the specified XML.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void checkXmlWhitespace(String out) throws Exception {
if (out.indexOf('\u0000') != -1) {
for (var s : out.split("\u0000"))
@@ -265,7 +266,9 @@ public class TestUtils extends Utils {
/**
* Validates XML whitespace and namespace formatting on a serialized object.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void validateXml(Object o) throws Exception {
validateXml(o, XmlSerializer.DEFAULT_NS_SQ);
}
@@ -273,7 +276,9 @@ public class TestUtils extends Utils {
/**
* Validates XML whitespace and namespace formatting on a serialized object.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void validateXml(Object o, XmlSerializer s) throws Exception {
s = s.copy().ws().ns().addNamespaceUrisToRoot().build();
var xml = s.serialize(o);
@@ -287,6 +292,9 @@ public class TestUtils extends Utils {
/**
* Extracts HTML/XML elements from a string based on element name and attributes.
*/
+ @SuppressWarnings({
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+ })
public static List<String> extractXml(String html, String elementName, Map<String,String> withAttributes) {
List<String> results = list();
if (html == null || elementName == null)
diff --git a/juneau-bean/juneau-bean-hal/src/test/java/org/apache/juneau/TestUtils.java b/juneau-bean/juneau-bean-hal/src/test/java/org/apache/juneau/TestUtils.java
index 53f16cac0e..6e7005f7ab 100644
--- a/juneau-bean/juneau-bean-hal/src/test/java/org/apache/juneau/TestUtils.java
+++ b/juneau-bean/juneau-bean-hal/src/test/java/org/apache/juneau/TestUtils.java
@@ -31,7 +31,6 @@ import java.util.stream.*;
import org.apache.juneau.commons.bean.*;
import org.apache.juneau.commons.utils.*;
-import org.apache.juneau.junit.bct.*;
import org.apache.juneau.marshall.serializer.*;
import org.apache.juneau.marshall.xml.*;
import org.junit.jupiter.api.*;
@@ -92,7 +91,9 @@ public class TestUtils extends Utils {
/**
* Validates that the whitespace is correct in the specified XML.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void checkXmlWhitespace(String out) throws Exception {
if (out.indexOf('\u0000') != -1) {
for (var s : out.split("\u0000"))
@@ -265,7 +266,9 @@ public class TestUtils extends Utils {
/**
* Validates XML whitespace and namespace formatting on a serialized object.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void validateXml(Object o) throws Exception {
validateXml(o, XmlSerializer.DEFAULT_NS_SQ);
}
@@ -273,7 +276,9 @@ public class TestUtils extends Utils {
/**
* Validates XML whitespace and namespace formatting on a serialized object.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void validateXml(Object o, XmlSerializer s) throws Exception {
s = s.copy().ws().ns().addNamespaceUrisToRoot().build();
var xml = s.serialize(o);
@@ -287,6 +292,9 @@ public class TestUtils extends Utils {
/**
* Extracts HTML/XML elements from a string based on element name and attributes.
*/
+ @SuppressWarnings({
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+ })
public static List<String> extractXml(String html, String elementName, Map<String,String> withAttributes) {
List<String> results = list();
if (html == null || elementName == null)
diff --git a/juneau-bean/juneau-bean-html5/src/test/java/org/apache/juneau/TestUtils.java b/juneau-bean/juneau-bean-html5/src/test/java/org/apache/juneau/TestUtils.java
index 53f16cac0e..997cf72f06 100644
--- a/juneau-bean/juneau-bean-html5/src/test/java/org/apache/juneau/TestUtils.java
+++ b/juneau-bean/juneau-bean-html5/src/test/java/org/apache/juneau/TestUtils.java
@@ -31,7 +31,6 @@ import java.util.stream.*;
import org.apache.juneau.commons.bean.*;
import org.apache.juneau.commons.utils.*;
-import org.apache.juneau.junit.bct.*;
import org.apache.juneau.marshall.serializer.*;
import org.apache.juneau.marshall.xml.*;
import org.junit.jupiter.api.*;
@@ -69,6 +68,9 @@ public class TestUtils extends Utils {
assertEquals(expected, s.toString(actual));
}
+ @SuppressWarnings({
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+ })
public static <T extends Throwable> T assertThrowable(Class<? extends Throwable> expectedType, String expectedSubstring, T t) {
var messages = getMessages(t);
assertTrue(messages.contains(expectedSubstring), fs("Expected message to contain: {0}.\nActual:\n{1}", expectedSubstring, messages));
@@ -92,7 +94,9 @@ public class TestUtils extends Utils {
/**
* Validates that the whitespace is correct in the specified XML.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void checkXmlWhitespace(String out) throws Exception {
if (out.indexOf('\u0000') != -1) {
for (var s : out.split("\u0000"))
@@ -265,7 +269,9 @@ public class TestUtils extends Utils {
/**
* Validates XML whitespace and namespace formatting on a serialized object.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void validateXml(Object o) throws Exception {
validateXml(o, XmlSerializer.DEFAULT_NS_SQ);
}
@@ -273,7 +279,9 @@ public class TestUtils extends Utils {
/**
* Validates XML whitespace and namespace formatting on a serialized object.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void validateXml(Object o, XmlSerializer s) throws Exception {
s = s.copy().ws().ns().addNamespaceUrisToRoot().build();
var xml = s.serialize(o);
@@ -287,6 +295,9 @@ public class TestUtils extends Utils {
/**
* Extracts HTML/XML elements from a string based on element name and attributes.
*/
+ @SuppressWarnings({
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+ })
public static List<String> extractXml(String html, String elementName, Map<String,String> withAttributes) {
List<String> results = list();
if (html == null || elementName == null)
@@ -303,7 +314,7 @@ public class TestUtils extends Utils {
if (tagEnd == -1) break;
var tag = html.substring(i, tagEnd + 1);
var matches = withAttributes == null || withAttributes.isEmpty();
- if (!matches) {
+ if (!matches && withAttributes != null) {
matches = true;
for (var entry : withAttributes.entrySet()) {
if (!tag.contains(entry.getKey() + "=\"" + entry.getValue() + "\"") && !tag.contains(entry.getKey() + "='" + entry.getValue() + "'")) {
diff --git a/juneau-bean/juneau-bean-html5/src/test/java/org/apache/juneau/bean/html5/Html5Template_ComboRoundTripTest.java b/juneau-bean/juneau-bean-html5/src/test/java/org/apache/juneau/bean/html5/Html5Template_ComboRoundTripTest.java
index 117b27a4ca..80b5d114cc 100644
--- a/juneau-bean/juneau-bean-html5/src/test/java/org/apache/juneau/bean/html5/Html5Template_ComboRoundTripTest.java
+++ b/juneau-bean/juneau-bean-html5/src/test/java/org/apache/juneau/bean/html5/Html5Template_ComboRoundTripTest.java
@@ -82,6 +82,9 @@ class Html5Template_ComboRoundTripTest extends ComboRoundTripTest_Base {
this.value2 = value2;
}
+ @SuppressWarnings({
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+ })
public Form swap(MarshallingSession session) {
return form(action,
input("text").name("v1").value(value1),
diff --git a/juneau-bean/juneau-bean-jsonapi/src/test/java/org/apache/juneau/TestUtils.java b/juneau-bean/juneau-bean-jsonapi/src/test/java/org/apache/juneau/TestUtils.java
index 53f16cac0e..0404de50dd 100644
--- a/juneau-bean/juneau-bean-jsonapi/src/test/java/org/apache/juneau/TestUtils.java
+++ b/juneau-bean/juneau-bean-jsonapi/src/test/java/org/apache/juneau/TestUtils.java
@@ -31,7 +31,6 @@ import java.util.stream.*;
import org.apache.juneau.commons.bean.*;
import org.apache.juneau.commons.utils.*;
-import org.apache.juneau.junit.bct.*;
import org.apache.juneau.marshall.serializer.*;
import org.apache.juneau.marshall.xml.*;
import org.junit.jupiter.api.*;
@@ -43,8 +42,7 @@ import org.junit.jupiter.api.*;
* in {@code juneau-utest}. Methods that depend on {@code juneau-rest-*} modules are excluded.</p>
*/
@SuppressWarnings({
- "unchecked", // BeanTester cast and generic type handling in test utilities
- "java:S1172" // Parameters kept for consistent method signatures across test utilities
+ "unchecked" // BeanTester cast and generic type handling in test utilities
})
public class TestUtils extends Utils {
@@ -92,7 +90,6 @@ public class TestUtils extends Utils {
/**
* Validates that the whitespace is correct in the specified XML.
*/
- @SuppressWarnings("java:S112")
public static final void checkXmlWhitespace(String out) throws Exception {
if (out.indexOf('\u0000') != -1) {
for (var s : out.split("\u0000"))
@@ -265,7 +262,6 @@ public class TestUtils extends Utils {
/**
* Validates XML whitespace and namespace formatting on a serialized object.
*/
- @SuppressWarnings("java:S112")
public static final void validateXml(Object o) throws Exception {
validateXml(o, XmlSerializer.DEFAULT_NS_SQ);
}
@@ -273,7 +269,6 @@ public class TestUtils extends Utils {
/**
* Validates XML whitespace and namespace formatting on a serialized object.
*/
- @SuppressWarnings("java:S112")
public static final void validateXml(Object o, XmlSerializer s) throws Exception {
s = s.copy().ws().ns().addNamespaceUrisToRoot().build();
var xml = s.serialize(o);
@@ -287,6 +282,9 @@ public class TestUtils extends Utils {
/**
* Extracts HTML/XML elements from a string based on element name and attributes.
*/
+ @SuppressWarnings({
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+ })
public static List<String> extractXml(String html, String elementName, Map<String,String> withAttributes) {
List<String> results = list();
if (html == null || elementName == null)
diff --git a/juneau-bean/juneau-bean-jsonpatch/src/test/java/org/apache/juneau/TestUtils.java b/juneau-bean/juneau-bean-jsonpatch/src/test/java/org/apache/juneau/TestUtils.java
index 53f16cac0e..0404de50dd 100644
--- a/juneau-bean/juneau-bean-jsonpatch/src/test/java/org/apache/juneau/TestUtils.java
+++ b/juneau-bean/juneau-bean-jsonpatch/src/test/java/org/apache/juneau/TestUtils.java
@@ -31,7 +31,6 @@ import java.util.stream.*;
import org.apache.juneau.commons.bean.*;
import org.apache.juneau.commons.utils.*;
-import org.apache.juneau.junit.bct.*;
import org.apache.juneau.marshall.serializer.*;
import org.apache.juneau.marshall.xml.*;
import org.junit.jupiter.api.*;
@@ -43,8 +42,7 @@ import org.junit.jupiter.api.*;
* in {@code juneau-utest}. Methods that depend on {@code juneau-rest-*} modules are excluded.</p>
*/
@SuppressWarnings({
- "unchecked", // BeanTester cast and generic type handling in test utilities
- "java:S1172" // Parameters kept for consistent method signatures across test utilities
+ "unchecked" // BeanTester cast and generic type handling in test utilities
})
public class TestUtils extends Utils {
@@ -92,7 +90,6 @@ public class TestUtils extends Utils {
/**
* Validates that the whitespace is correct in the specified XML.
*/
- @SuppressWarnings("java:S112")
public static final void checkXmlWhitespace(String out) throws Exception {
if (out.indexOf('\u0000') != -1) {
for (var s : out.split("\u0000"))
@@ -265,7 +262,6 @@ public class TestUtils extends Utils {
/**
* Validates XML whitespace and namespace formatting on a serialized object.
*/
- @SuppressWarnings("java:S112")
public static final void validateXml(Object o) throws Exception {
validateXml(o, XmlSerializer.DEFAULT_NS_SQ);
}
@@ -273,7 +269,6 @@ public class TestUtils extends Utils {
/**
* Validates XML whitespace and namespace formatting on a serialized object.
*/
- @SuppressWarnings("java:S112")
public static final void validateXml(Object o, XmlSerializer s) throws Exception {
s = s.copy().ws().ns().addNamespaceUrisToRoot().build();
var xml = s.serialize(o);
@@ -287,6 +282,9 @@ public class TestUtils extends Utils {
/**
* Extracts HTML/XML elements from a string based on element name and attributes.
*/
+ @SuppressWarnings({
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+ })
public static List<String> extractXml(String html, String elementName, Map<String,String> withAttributes) {
List<String> results = list();
if (html == null || elementName == null)
diff --git a/juneau-bean/juneau-bean-jsonschema/src/test/java/org/apache/juneau/TestUtils.java b/juneau-bean/juneau-bean-jsonschema/src/test/java/org/apache/juneau/TestUtils.java
index 53f16cac0e..997cf72f06 100644
--- a/juneau-bean/juneau-bean-jsonschema/src/test/java/org/apache/juneau/TestUtils.java
+++ b/juneau-bean/juneau-bean-jsonschema/src/test/java/org/apache/juneau/TestUtils.java
@@ -31,7 +31,6 @@ import java.util.stream.*;
import org.apache.juneau.commons.bean.*;
import org.apache.juneau.commons.utils.*;
-import org.apache.juneau.junit.bct.*;
import org.apache.juneau.marshall.serializer.*;
import org.apache.juneau.marshall.xml.*;
import org.junit.jupiter.api.*;
@@ -69,6 +68,9 @@ public class TestUtils extends Utils {
assertEquals(expected, s.toString(actual));
}
+ @SuppressWarnings({
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+ })
public static <T extends Throwable> T assertThrowable(Class<? extends Throwable> expectedType, String expectedSubstring, T t) {
var messages = getMessages(t);
assertTrue(messages.contains(expectedSubstring), fs("Expected message to contain: {0}.\nActual:\n{1}", expectedSubstring, messages));
@@ -92,7 +94,9 @@ public class TestUtils extends Utils {
/**
* Validates that the whitespace is correct in the specified XML.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void checkXmlWhitespace(String out) throws Exception {
if (out.indexOf('\u0000') != -1) {
for (var s : out.split("\u0000"))
@@ -265,7 +269,9 @@ public class TestUtils extends Utils {
/**
* Validates XML whitespace and namespace formatting on a serialized object.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void validateXml(Object o) throws Exception {
validateXml(o, XmlSerializer.DEFAULT_NS_SQ);
}
@@ -273,7 +279,9 @@ public class TestUtils extends Utils {
/**
* Validates XML whitespace and namespace formatting on a serialized object.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void validateXml(Object o, XmlSerializer s) throws Exception {
s = s.copy().ws().ns().addNamespaceUrisToRoot().build();
var xml = s.serialize(o);
@@ -287,6 +295,9 @@ public class TestUtils extends Utils {
/**
* Extracts HTML/XML elements from a string based on element name and attributes.
*/
+ @SuppressWarnings({
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+ })
public static List<String> extractXml(String html, String elementName, Map<String,String> withAttributes) {
List<String> results = list();
if (html == null || elementName == null)
@@ -303,7 +314,7 @@ public class TestUtils extends Utils {
if (tagEnd == -1) break;
var tag = html.substring(i, tagEnd + 1);
var matches = withAttributes == null || withAttributes.isEmpty();
- if (!matches) {
+ if (!matches && withAttributes != null) {
matches = true;
for (var entry : withAttributes.entrySet()) {
if (!tag.contains(entry.getKey() + "=\"" + entry.getValue() + "\"") && !tag.contains(entry.getKey() + "='" + entry.getValue() + "'")) {
diff --git a/juneau-bean/juneau-bean-jsonschema/src/test/java/org/apache/juneau/bean/jsonschema/JsonSchemaMap_Test.java b/juneau-bean/juneau-bean-jsonschema/src/test/java/org/apache/juneau/bean/jsonschema/JsonSchemaMap_Test.java
index 6479d6fdcc..4cd8f4af88 100644
--- a/juneau-bean/juneau-bean-jsonschema/src/test/java/org/apache/juneau/bean/jsonschema/JsonSchemaMap_Test.java
+++ b/juneau-bean/juneau-bean-jsonschema/src/test/java/org/apache/juneau/bean/jsonschema/JsonSchemaMap_Test.java
@@ -26,7 +26,8 @@ import org.junit.jupiter.api.*;
@SuppressWarnings({
"removal", // Tests deprecated getId() / setId() for backward compatibility
- "java:S5778" // assertThrows lambdas with chained calls; intermediate invocations do not throw in practice
+ "java:S5778", // assertThrows lambdas with chained calls; intermediate invocations do not throw in practice
+ "resource" // Reader fixtures returned by getReader() overrides are test stubs (null / throwing); no resource to close.
})
class JsonSchemaMap_Test extends TestBase {
diff --git a/juneau-bean/juneau-bean-mcp/src/test/java/org/apache/juneau/TestUtils.java b/juneau-bean/juneau-bean-mcp/src/test/java/org/apache/juneau/TestUtils.java
index 53f16cac0e..6e7005f7ab 100644
--- a/juneau-bean/juneau-bean-mcp/src/test/java/org/apache/juneau/TestUtils.java
+++ b/juneau-bean/juneau-bean-mcp/src/test/java/org/apache/juneau/TestUtils.java
@@ -31,7 +31,6 @@ import java.util.stream.*;
import org.apache.juneau.commons.bean.*;
import org.apache.juneau.commons.utils.*;
-import org.apache.juneau.junit.bct.*;
import org.apache.juneau.marshall.serializer.*;
import org.apache.juneau.marshall.xml.*;
import org.junit.jupiter.api.*;
@@ -92,7 +91,9 @@ public class TestUtils extends Utils {
/**
* Validates that the whitespace is correct in the specified XML.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void checkXmlWhitespace(String out) throws Exception {
if (out.indexOf('\u0000') != -1) {
for (var s : out.split("\u0000"))
@@ -265,7 +266,9 @@ public class TestUtils extends Utils {
/**
* Validates XML whitespace and namespace formatting on a serialized object.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void validateXml(Object o) throws Exception {
validateXml(o, XmlSerializer.DEFAULT_NS_SQ);
}
@@ -273,7 +276,9 @@ public class TestUtils extends Utils {
/**
* Validates XML whitespace and namespace formatting on a serialized object.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void validateXml(Object o, XmlSerializer s) throws Exception {
s = s.copy().ws().ns().addNamespaceUrisToRoot().build();
var xml = s.serialize(o);
@@ -287,6 +292,9 @@ public class TestUtils extends Utils {
/**
* Extracts HTML/XML elements from a string based on element name and attributes.
*/
+ @SuppressWarnings({
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+ })
public static List<String> extractXml(String html, String elementName, Map<String,String> withAttributes) {
List<String> results = list();
if (html == null || elementName == null)
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/TestUtils.java b/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/TestUtils.java
index 53f16cac0e..02eae590a0 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/TestUtils.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/test/java/org/apache/juneau/TestUtils.java
@@ -31,7 +31,6 @@ import java.util.stream.*;
import org.apache.juneau.commons.bean.*;
import org.apache.juneau.commons.utils.*;
-import org.apache.juneau.junit.bct.*;
import org.apache.juneau.marshall.serializer.*;
import org.apache.juneau.marshall.xml.*;
import org.junit.jupiter.api.*;
@@ -69,6 +68,9 @@ public class TestUtils extends Utils {
assertEquals(expected, s.toString(actual));
}
+ @SuppressWarnings({
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+ })
public static <T extends Throwable> T assertThrowable(Class<? extends Throwable> expectedType, String expectedSubstring, T t) {
var messages = getMessages(t);
assertTrue(messages.contains(expectedSubstring), fs("Expected message to contain: {0}.\nActual:\n{1}", expectedSubstring, messages));
@@ -92,7 +94,9 @@ public class TestUtils extends Utils {
/**
* Validates that the whitespace is correct in the specified XML.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void checkXmlWhitespace(String out) throws Exception {
if (out.indexOf('\u0000') != -1) {
for (var s : out.split("\u0000"))
@@ -265,7 +269,9 @@ public class TestUtils extends Utils {
/**
* Validates XML whitespace and namespace formatting on a serialized object.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void validateXml(Object o) throws Exception {
validateXml(o, XmlSerializer.DEFAULT_NS_SQ);
}
@@ -273,7 +279,9 @@ public class TestUtils extends Utils {
/**
* Validates XML whitespace and namespace formatting on a serialized object.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void validateXml(Object o, XmlSerializer s) throws Exception {
s = s.copy().ws().ns().addNamespaceUrisToRoot().build();
var xml = s.serialize(o);
@@ -287,6 +295,9 @@ public class TestUtils extends Utils {
/**
* Extracts HTML/XML elements from a string based on element name and attributes.
*/
+ @SuppressWarnings({
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+ })
public static List<String> extractXml(String html, String elementName, Map<String,String> withAttributes) {
List<String> results = list();
if (html == null || elementName == null)
diff --git a/juneau-core/juneau-junit5/src/test/java/org/apache/juneau/org/apache/juneau/TestBase.java b/juneau-bean/juneau-bean-rfc7807/src/test/java/org/apache/juneau/TestBase.java
similarity index 100%
copy from juneau-core/juneau-junit5/src/test/java/org/apache/juneau/org/apache/juneau/TestBase.java
copy to juneau-bean/juneau-bean-rfc7807/src/test/java/org/apache/juneau/TestBase.java
diff --git a/juneau-bean/juneau-bean-rfc7807/src/test/java/org/apache/juneau/bean/rfc7807/ProblemException_Test.java b/juneau-bean/juneau-bean-rfc7807/src/test/java/org/apache/juneau/bean/rfc7807/ProblemException_Test.java
new file mode 100644
index 0000000000..92d80ab6d9
--- /dev/null
+++ b/juneau-bean/juneau-bean-rfc7807/src/test/java/org/apache/juneau/bean/rfc7807/ProblemException_Test.java
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.juneau.bean.rfc7807;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+import org.apache.juneau.*;
+import org.junit.jupiter.api.*;
+
+/**
+ * Tests {@link ProblemException} — construction, factory, getter round-trip, and throw/catch behavior.
+ */
+class ProblemException_Test extends TestBase {
+
+ @Test
+ void a01_constructor_storesProblem() {
+ var problem = Problem.fromStatus(404, "Not Found", "Order 1 missing");
+ var ex = new ProblemException(problem);
+ assertSame(problem, ex.getProblem());
+ }
+
+ @Test
+ void a02_constructor_nullProblem_isAllowed() {
+ var ex = new ProblemException(null);
+ assertNull(ex.getProblem());
+ assertNull(ex.getMessage());
+ }
+
+ @Test
+ void a03_message_fromDetail() {
+ var problem = Problem.fromStatus(500, "Internal Server Error", "boom");
+ var ex = new ProblemException(problem);
+ assertEquals("boom", ex.getMessage());
+ }
+
+ @Test
+ void a04_message_fallsBackToTitle_whenDetailNull() {
+ var problem = new Problem().setStatus(403).setTitle("Forbidden");
+ var ex = new ProblemException(problem);
+ assertEquals("Forbidden", ex.getMessage());
+ }
+
+ @Test
+ void a05_message_nullWhenBothDetailAndTitleNull() {
+ var problem = new Problem().setStatus(418);
+ var ex = new ProblemException(problem);
+ assertNull(ex.getMessage());
+ }
+
+ @Test
+ void a06_factory_of_returnsNewInstance() {
+ var problem = Problem.fromStatus(409, "Conflict", "Version mismatch");
+ var ex = ProblemException.of(problem);
+ assertSame(problem, ex.getProblem());
+ assertEquals("Version mismatch", ex.getMessage());
+ }
+
+ @Test
+ void a07_throwCatch_roundTrip() {
+ var problem = Problem.fromStatus(429, "Too Many Requests", "Slow down");
+ try {
+ throw new ProblemException(problem);
+ } catch (ProblemException caught) {
+ assertSame(problem, caught.getProblem());
+ assertEquals(Integer.valueOf(429), caught.getProblem().getStatus());
+ assertEquals("Too Many Requests", caught.getProblem().getTitle());
+ assertEquals("Slow down", caught.getProblem().getDetail());
+ }
+ }
+
+ @Test
+ void a08_isRuntimeException() {
+ var ex = new ProblemException(Problem.fromStatus(500, "Internal Server Error", "x"));
+ assertTrue(ex instanceof RuntimeException);
+ }
+
+ @Test
+ void a09_preservesExtensionFields() {
+ var problem = Problem.fromStatus(403, "Insufficient credit", "Balance 30 < cost 50")
+ .set("balance", 30)
+ .set("accounts", "[a,b]");
+ var ex = new ProblemException(problem);
+ var recovered = ex.getProblem();
+ assertEquals(30, recovered.get("balance"));
+ assertEquals("[a,b]", recovered.get("accounts"));
+ }
+}
diff --git a/juneau-bean/juneau-bean-swagger-v2/src/test/java/org/apache/juneau/TestUtils.java b/juneau-bean/juneau-bean-swagger-v2/src/test/java/org/apache/juneau/TestUtils.java
index 53f16cac0e..02eae590a0 100644
--- a/juneau-bean/juneau-bean-swagger-v2/src/test/java/org/apache/juneau/TestUtils.java
+++ b/juneau-bean/juneau-bean-swagger-v2/src/test/java/org/apache/juneau/TestUtils.java
@@ -31,7 +31,6 @@ import java.util.stream.*;
import org.apache.juneau.commons.bean.*;
import org.apache.juneau.commons.utils.*;
-import org.apache.juneau.junit.bct.*;
import org.apache.juneau.marshall.serializer.*;
import org.apache.juneau.marshall.xml.*;
import org.junit.jupiter.api.*;
@@ -69,6 +68,9 @@ public class TestUtils extends Utils {
assertEquals(expected, s.toString(actual));
}
+ @SuppressWarnings({
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+ })
public static <T extends Throwable> T assertThrowable(Class<? extends Throwable> expectedType, String expectedSubstring, T t) {
var messages = getMessages(t);
assertTrue(messages.contains(expectedSubstring), fs("Expected message to contain: {0}.\nActual:\n{1}", expectedSubstring, messages));
@@ -92,7 +94,9 @@ public class TestUtils extends Utils {
/**
* Validates that the whitespace is correct in the specified XML.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void checkXmlWhitespace(String out) throws Exception {
if (out.indexOf('\u0000') != -1) {
for (var s : out.split("\u0000"))
@@ -265,7 +269,9 @@ public class TestUtils extends Utils {
/**
* Validates XML whitespace and namespace formatting on a serialized object.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void validateXml(Object o) throws Exception {
validateXml(o, XmlSerializer.DEFAULT_NS_SQ);
}
@@ -273,7 +279,9 @@ public class TestUtils extends Utils {
/**
* Validates XML whitespace and namespace formatting on a serialized object.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void validateXml(Object o, XmlSerializer s) throws Exception {
s = s.copy().ws().ns().addNamespaceUrisToRoot().build();
var xml = s.serialize(o);
@@ -287,6 +295,9 @@ public class TestUtils extends Utils {
/**
* Extracts HTML/XML elements from a string based on element name and attributes.
*/
+ @SuppressWarnings({
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+ })
public static List<String> extractXml(String html, String elementName, Map<String,String> withAttributes) {
List<String> results = list();
if (html == null || elementName == null)
diff --git a/juneau-bean/juneau-bean-swagger-v2/src/test/java/org/apache/juneau/bean/swagger/ui/SwaggerUI_Test.java b/juneau-bean/juneau-bean-swagger-v2/src/test/java/org/apache/juneau/bean/swagger/ui/SwaggerUI_Test.java
index 7104df3bcb..492b9b3519 100644
--- a/juneau-bean/juneau-bean-swagger-v2/src/test/java/org/apache/juneau/bean/swagger/ui/SwaggerUI_Test.java
+++ b/juneau-bean/juneau-bean-swagger-v2/src/test/java/org/apache/juneau/bean/swagger/ui/SwaggerUI_Test.java
@@ -34,7 +34,8 @@ import org.junit.jupiter.params.provider.*;
* Testcase for {@link SwaggerUI}.
*/
@SuppressWarnings({
- "java:S4144" // Identical test methods intentional for testing different scenarios
+ "java:S4144", // Identical test methods intentional for testing different scenarios
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
})
class SwaggerUI_Test extends TestBase {
diff --git a/juneau-core/juneau-assertions/src/test/java/org/apache/juneau/TestUtils.java b/juneau-core/juneau-assertions/src/test/java/org/apache/juneau/TestUtils.java
index 53f16cac0e..02eae590a0 100644
--- a/juneau-core/juneau-assertions/src/test/java/org/apache/juneau/TestUtils.java
+++ b/juneau-core/juneau-assertions/src/test/java/org/apache/juneau/TestUtils.java
@@ -31,7 +31,6 @@ import java.util.stream.*;
import org.apache.juneau.commons.bean.*;
import org.apache.juneau.commons.utils.*;
-import org.apache.juneau.junit.bct.*;
import org.apache.juneau.marshall.serializer.*;
import org.apache.juneau.marshall.xml.*;
import org.junit.jupiter.api.*;
@@ -69,6 +68,9 @@ public class TestUtils extends Utils {
assertEquals(expected, s.toString(actual));
}
+ @SuppressWarnings({
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+ })
public static <T extends Throwable> T assertThrowable(Class<? extends Throwable> expectedType, String expectedSubstring, T t) {
var messages = getMessages(t);
assertTrue(messages.contains(expectedSubstring), fs("Expected message to contain: {0}.\nActual:\n{1}", expectedSubstring, messages));
@@ -92,7 +94,9 @@ public class TestUtils extends Utils {
/**
* Validates that the whitespace is correct in the specified XML.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void checkXmlWhitespace(String out) throws Exception {
if (out.indexOf('\u0000') != -1) {
for (var s : out.split("\u0000"))
@@ -265,7 +269,9 @@ public class TestUtils extends Utils {
/**
* Validates XML whitespace and namespace formatting on a serialized object.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void validateXml(Object o) throws Exception {
validateXml(o, XmlSerializer.DEFAULT_NS_SQ);
}
@@ -273,7 +279,9 @@ public class TestUtils extends Utils {
/**
* Validates XML whitespace and namespace formatting on a serialized object.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void validateXml(Object o, XmlSerializer s) throws Exception {
s = s.copy().ws().ns().addNamespaceUrisToRoot().build();
var xml = s.serialize(o);
@@ -287,6 +295,9 @@ public class TestUtils extends Utils {
/**
* Extracts HTML/XML elements from a string based on element name and attributes.
*/
+ @SuppressWarnings({
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+ })
public static List<String> extractXml(String html, String elementName, Map<String,String> withAttributes) {
List<String> results = list();
if (html == null || elementName == null)
diff --git a/juneau-core/juneau-assertions/src/test/java/org/apache/juneau/assertions/Assertion_Test.java b/juneau-core/juneau-assertions/src/test/java/org/apache/juneau/assertions/Assertion_Test.java
index ee9e62329d..b060aff879 100644
--- a/juneau-core/juneau-assertions/src/test/java/org/apache/juneau/assertions/Assertion_Test.java
+++ b/juneau-core/juneau-assertions/src/test/java/org/apache/juneau/assertions/Assertion_Test.java
@@ -41,6 +41,9 @@ class Assertion_Test extends TestBase {
}
public static class A3 extends RuntimeException {
+ @SuppressWarnings({
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+ })
public A3(String msg) { throw new A2("fromA3", null); }
}
diff --git a/juneau-core/juneau-assertions/src/test/java/org/apache/juneau/utest/utils/FakeStreamSerializer.java b/juneau-core/juneau-assertions/src/test/java/org/apache/juneau/utest/utils/FakeStreamSerializer.java
index e529c0dc95..b8fde4ceae 100644
--- a/juneau-core/juneau-assertions/src/test/java/org/apache/juneau/utest/utils/FakeStreamSerializer.java
+++ b/juneau-core/juneau-assertions/src/test/java/org/apache/juneau/utest/utils/FakeStreamSerializer.java
@@ -84,6 +84,9 @@ public class FakeStreamSerializer extends OutputStreamSerializer {
}
@Override /* SerializerSession */
+ @SuppressWarnings({
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+ })
protected void doSerialize(SerializerSession session, SerializerPipe out, Object o) throws IOException, SerializeException {
out.getOutputStream().write(function.apply(session, o));
}
diff --git a/juneau-core/juneau-assertions/src/test/java/org/apache/juneau/utest/utils/FakeWriterSerializer.java b/juneau-core/juneau-assertions/src/test/java/org/apache/juneau/utest/utils/FakeWriterSerializer.java
index 7100b26a9d..5f91e422d7 100644
--- a/juneau-core/juneau-assertions/src/test/java/org/apache/juneau/utest/utils/FakeWriterSerializer.java
+++ b/juneau-core/juneau-assertions/src/test/java/org/apache/juneau/utest/utils/FakeWriterSerializer.java
@@ -122,6 +122,9 @@ public class FakeWriterSerializer extends WriterSerializer implements HttpPartSe
}
@Override /* SerializerSession */
+ @SuppressWarnings({
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+ })
protected void doSerialize(SerializerSession session, SerializerPipe out, Object o) throws IOException, SerializeException {
out.getWriter().write(function.apply((WriterSerializerSession)session,o));
}
diff --git a/juneau-core/juneau-bct/src/test/java/org/apache/juneau/junit/bct/BasicBeanConverter_Test.java b/juneau-core/juneau-bct/src/test/java/org/apache/juneau/junit/bct/BasicBeanConverter_Test.java
index 3112a5d6bf..4b22cf2c55 100644
--- a/juneau-core/juneau-bct/src/test/java/org/apache/juneau/junit/bct/BasicBeanConverter_Test.java
+++ b/juneau-core/juneau-bct/src/test/java/org/apache/juneau/junit/bct/BasicBeanConverter_Test.java
@@ -37,7 +37,9 @@ import org.junit.jupiter.api.*;
* Unit tests for BasicBeanConverter.
*/
@DisplayName("BasicBeanConverter")
-@SuppressWarnings({"java:S5778" /* assertThrows lambdas with chained calls; intermediate invocations do not throw in practice */})
+@SuppressWarnings({
+ "java:S5778" // assertThrows lambdas with chained calls; intermediate invocations do not throw in practice
+})
class BasicBeanConverter_Test extends TestBase {
//------------------------------------------------------------------------------------------------------------------
diff --git a/juneau-core/juneau-bct/src/test/java/org/apache/juneau/junit/bct/BctConfig_Test.java b/juneau-core/juneau-bct/src/test/java/org/apache/juneau/junit/bct/BctConfig_Test.java
index 21ad712b43..99c875f583 100644
--- a/juneau-core/juneau-bct/src/test/java/org/apache/juneau/junit/bct/BctConfig_Test.java
+++ b/juneau-core/juneau-bct/src/test/java/org/apache/juneau/junit/bct/BctConfig_Test.java
@@ -275,6 +275,8 @@ class BctConfig_Test extends TestBase {
* Converter without no-arg constructor (should fail).
*/
static class InvalidConverter extends BasicBeanConverter {
+ // 'arg' exists only to make this a non-no-arg constructor, which is the failure case under test.
+ @SuppressWarnings("unused")
public InvalidConverter(String arg) {
super(BasicBeanConverter.builder().defaultSettings());
}
diff --git a/juneau-core/juneau-bct/src/test/java/org/apache/juneau/junit/bct/Listifier_Test.java b/juneau-core/juneau-bct/src/test/java/org/apache/juneau/junit/bct/Listifier_Test.java
index 794491d1fa..ac53eb91e5 100644
--- a/juneau-core/juneau-bct/src/test/java/org/apache/juneau/junit/bct/Listifier_Test.java
+++ b/juneau-core/juneau-bct/src/test/java/org/apache/juneau/junit/bct/Listifier_Test.java
@@ -323,6 +323,8 @@ class Listifier_Test extends TestBase {
// ====================================================================================================
static class ListifierMethods {
+ // 'converter' is required by the Listifier functional-interface signature (used as a method reference).
+ @SuppressWarnings("unused")
static List<Object> splitToChars(BeanConverter converter, String str) {
return l((Object[])str.split(""));
}
diff --git a/juneau-core/juneau-bct/src/test/java/org/apache/juneau/junit/bct/NestedTokenizer_Test.java b/juneau-core/juneau-bct/src/test/java/org/apache/juneau/junit/bct/NestedTokenizer_Test.java
index b7868488f4..8cc8550f2c 100644
--- a/juneau-core/juneau-bct/src/test/java/org/apache/juneau/junit/bct/NestedTokenizer_Test.java
+++ b/juneau-core/juneau-bct/src/test/java/org/apache/juneau/junit/bct/NestedTokenizer_Test.java
@@ -43,6 +43,8 @@ class NestedTokenizer_Test extends TestBase {
// Basic tokenization tests
//------------------------------------------------------------------------------------------------------------------
+ // Intentionally exercises the default constructor for coverage; the instance is not otherwise needed.
+ @SuppressWarnings("unused")
@Test void a01_simpleTokens() {
new NestedTokenizer();
diff --git a/juneau-core/juneau-bct/src/test/java/org/apache/juneau/junit/bct/Stringifier_Test.java b/juneau-core/juneau-bct/src/test/java/org/apache/juneau/junit/bct/Stringifier_Test.java
index 805fb239b8..4acecf3c5b 100644
--- a/juneau-core/juneau-bct/src/test/java/org/apache/juneau/junit/bct/Stringifier_Test.java
+++ b/juneau-core/juneau-bct/src/test/java/org/apache/juneau/junit/bct/Stringifier_Test.java
@@ -387,6 +387,8 @@ class Stringifier_Test extends TestBase {
// ====================================================================================================
static class StringifierMethods {
+ // 'converter' is required by the Stringifier functional-interface signature (used as a method reference).
+ @SuppressWarnings("unused")
static String addPrefix(BeanConverter converter, String str) {
return "PREFIX:" + str;
}
diff --git a/juneau-core/juneau-bct/src/test/java/org/apache/juneau/junit/bct/Swapper_Test.java b/juneau-core/juneau-bct/src/test/java/org/apache/juneau/junit/bct/Swapper_Test.java
index c118eb89e6..5361eb6579 100644
--- a/juneau-core/juneau-bct/src/test/java/org/apache/juneau/junit/bct/Swapper_Test.java
+++ b/juneau-core/juneau-bct/src/test/java/org/apache/juneau/junit/bct/Swapper_Test.java
@@ -437,6 +437,8 @@ class Swapper_Test extends TestBase {
// ====================================================================================================
static class SwapperMethods {
+ // 'converter' is required by the Swapper functional-interface signature (used as a method reference).
+ @SuppressWarnings("unused")
static String addPrefix(BeanConverter converter, String str) {
return "PREFIX:" + str;
}
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/AppliedAnnotationObject_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/AppliedAnnotationObject_Test.java
index 2cbdc24d3c..9a0130113c 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/AppliedAnnotationObject_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/AppliedAnnotationObject_Test.java
@@ -27,7 +27,8 @@ import org.junit.jupiter.api.*;
@SuppressWarnings({
"java:S1172", // Unused parameters in tests are intentional
- "java:S1186" // Empty test method intentional for framework testing
+ "java:S1186", // Empty test method intentional for framework testing
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
})
class AppliedAnnotationObject_Test extends TestBase {
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/TestAssertions.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/TestAssertions.java
index bc21e3aa92..b283a3de8e 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/TestAssertions.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/TestAssertions.java
@@ -38,7 +38,7 @@ import java.util.stream.*;
@SuppressWarnings({
"java:S3011", // Reflective access needed for assertBean/assertEmpty
"java:S1172", // Consistent method signatures are intentional
- "unchecked",
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
})
public class TestAssertions {
@@ -269,7 +269,9 @@ public class TestAssertions {
throw new AssertionError("assertEmpty: cannot determine if " + o.getClass().getName() + " is empty");
}
- @SuppressWarnings("java:S1452")
+ @SuppressWarnings({
+ "java:S1452" // Wildcard type parameter required for test utility generics.
+ })
private static Map<?, ?> toOrderedMap(Map<?, ?> actual) {
if (actual instanceof SortedMap || actual instanceof LinkedHashMap) return actual;
List<Map.Entry<?, ?>> entries = new ArrayList<>(actual.entrySet());
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/TestUtils.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/TestUtils.java
index a2c0438cce..5e8346a7f4 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/TestUtils.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/TestUtils.java
@@ -31,7 +31,9 @@ import org.junit.jupiter.api.function.*;
* Use {@code import static org.apache.juneau.commons.TestUtils.*;} to pull in
* all utility methods from both this class and the inherited {@link Utils} methods.</p>
*/
-@SuppressWarnings("java:S1172") // Test utility methods may have unused parameters for consistent signatures
+@SuppressWarnings({
+ "java:S1172" // Test utility methods may have unused parameters for consistent signatures
+})
public class TestUtils extends Utils {
/**
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/bean/BeanMap_Coverage_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/bean/BeanMap_Coverage_Test.java
index f4b3c81035..0b2d6dd90d 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/bean/BeanMap_Coverage_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/bean/BeanMap_Coverage_Test.java
@@ -32,6 +32,9 @@ import org.apache.juneau.commons.TestBase;
* the helper methods (resolveVars, getProperty, getProperties, getRaw, getBean, load, forEachValue),
* and the various ignore/error paths that the marshalling-side BeanMap_Test does not cover.
*/
+@SuppressWarnings({
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+})
class BeanMap_Coverage_Test extends TestBase {
//====================================================================================================
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/bean/BeanMeta_Coverage_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/bean/BeanMeta_Coverage_Test.java
index 9cc349382c..09f366b526 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/bean/BeanMeta_Coverage_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/bean/BeanMeta_Coverage_Test.java
@@ -34,7 +34,9 @@ import org.apache.juneau.commons.TestBase;
* the various construction paths (records, fluent setters, no-arg constructors, BeanCtor,
* @BeanType properties/excludeProperties/unsorted), and newBean / hasConstructor.
*/
-@SuppressWarnings("unused")
+@SuppressWarnings({
+ "unused" // Unused in this context; kept for API consistency or future use.
+})
class BeanMeta_Coverage_Test extends TestBase {
//====================================================================================================
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/bean/BeanPropertyMeta_Coverage_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/bean/BeanPropertyMeta_Coverage_Test.java
index a2a7a125fd..16ffde2730 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/bean/BeanPropertyMeta_Coverage_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/bean/BeanPropertyMeta_Coverage_Test.java
@@ -35,7 +35,9 @@ import org.apache.juneau.commons.TestBase;
* {@link BeanPropertyMeta#set}, {@link BeanPropertyMeta#getRaw}, {@link BeanPropertyMeta#getDynaMap} methods,
* and the marshalling-only-path {@link UnsupportedOperationException} thrown by {@link BeanPropertyMeta#add}.
*/
-@SuppressWarnings("unused")
+@SuppressWarnings({
+ "unused" // Unused in this context; kept for API consistency or future use.
+})
class BeanPropertyMeta_Coverage_Test extends TestBase {
//====================================================================================================
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/collections/FilteredList_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/collections/FilteredList_Test.java
index d966a40b8e..1e3b7d1d33 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/collections/FilteredList_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/collections/FilteredList_Test.java
@@ -30,6 +30,9 @@ import java.util.function.*;
import org.junit.jupiter.api.*;
import org.apache.juneau.commons.TestBase;
+@SuppressWarnings({
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+})
class FilteredList_Test extends TestBase {
//====================================================================================================
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/collections/FilteredMap_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/collections/FilteredMap_Test.java
index 46bd74a17c..d8ba5c36dd 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/collections/FilteredMap_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/collections/FilteredMap_Test.java
@@ -30,6 +30,9 @@ import java.util.function.*;
import org.junit.jupiter.api.*;
import org.apache.juneau.commons.TestBase;
+@SuppressWarnings({
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+})
class FilteredMap_Test extends TestBase {
//====================================================================================================
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/collections/FilteredSet_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/collections/FilteredSet_Test.java
index 790c519032..770d1f2250 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/collections/FilteredSet_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/collections/FilteredSet_Test.java
@@ -30,6 +30,9 @@ import java.util.function.*;
import org.junit.jupiter.api.*;
import org.apache.juneau.commons.TestBase;
+@SuppressWarnings({
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+})
class FilteredSet_Test extends TestBase {
//====================================================================================================
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/collections/Maps_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/collections/Maps_Test.java
index 0ed662d9aa..198f848858 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/collections/Maps_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/collections/Maps_Test.java
@@ -16,7 +16,6 @@
*/
package org.apache.juneau.commons.collections;
-import static org.apache.juneau.commons.lang.TriState.*;
import static org.apache.juneau.commons.TestAssertions.*;
import static org.junit.jupiter.api.Assertions.*;
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/collections/Sets_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/collections/Sets_Test.java
index 7f745f251e..b70ff32216 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/collections/Sets_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/collections/Sets_Test.java
@@ -16,7 +16,6 @@
*/
package org.apache.juneau.commons.collections;
-import static org.apache.juneau.commons.lang.TriState.*;
import static org.apache.juneau.commons.utils.CollectionUtils.*;
import static org.apache.juneau.commons.TestAssertions.*;
import static org.junit.jupiter.api.Assertions.*;
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/collections/SimpleMap_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/collections/SimpleMap_Test.java
index dbdbb8774e..a5fddce047 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/collections/SimpleMap_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/collections/SimpleMap_Test.java
@@ -26,6 +26,9 @@ import java.util.*;
import org.junit.jupiter.api.*;
import org.apache.juneau.commons.TestBase;
+@SuppressWarnings({
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+})
class SimpleMap_Test extends TestBase {
//====================================================================================================
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/concurrent/SimpleReadWriteLock_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/concurrent/SimpleReadWriteLock_Test.java
index 1a38e013c1..82012c7218 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/concurrent/SimpleReadWriteLock_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/concurrent/SimpleReadWriteLock_Test.java
@@ -24,6 +24,9 @@ import org.apache.juneau.commons.TestBase;
/**
* Tests for {@link SimpleReadWriteLock}.
*/
+@SuppressWarnings({
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+})
class SimpleReadWriteLock_Test extends TestBase {
//====================================================================================================
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/conversion/CachingConverter_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/conversion/CachingConverter_Test.java
index e3b9fdbcfa..1da29b9bd9 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/conversion/CachingConverter_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/conversion/CachingConverter_Test.java
@@ -57,7 +57,9 @@ class CachingConverter_Test extends TestBase {
}
// Helper to get a ParameterizedType for List<String> via reflection.
- @SuppressWarnings("unused")
+ @SuppressWarnings({
+ "unused" // Unused in this context; kept for API consistency or future use.
+ })
private List<String> listOfStringField;
private static final Type LIST_OF_STRING;
static {
@@ -92,7 +94,9 @@ class CachingConverter_Test extends TestBase {
}
// Helper field used to obtain a ParameterizedType for use as an arg.
- @SuppressWarnings("unused")
+ @SuppressWarnings({
+ "unused" // Unused in this context; kept for API consistency or future use.
+ })
private List<String> listArgField;
private static final Type LIST_ARG_TYPE;
static {
@@ -147,7 +151,9 @@ class CachingConverter_Test extends TestBase {
assertEquals("42", C.to(42, D_MEMBER_OF, (ConverterSession)null, (Type) String.class));
}
- @SuppressWarnings("unused")
+ @SuppressWarnings({
+ "unused" // Unused in this context; kept for API consistency or future use.
+ })
private List<String> d03_listField;
private static final Type D03_LIST_TYPE;
static {
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/conversion/ConfigurableConverter_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/conversion/ConfigurableConverter_Test.java
index d1d30ea4b9..35db4a85da 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/conversion/ConfigurableConverter_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/conversion/ConfigurableConverter_Test.java
@@ -25,6 +25,9 @@ import org.junit.jupiter.api.*;
/**
* Unit tests for {@link ConfigurableConverter}.
*/
+@SuppressWarnings({
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+})
class ConfigurableConverter_Test {
// =================================================================================================================
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/function/BeanChannel_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/function/BeanChannel_Test.java
index e77cf0974e..5c5ca72141 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/function/BeanChannel_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/function/BeanChannel_Test.java
@@ -27,7 +27,9 @@ import org.apache.juneau.commons.TestBase;
* Unit tests for {@link BeanFactory}, {@link BeanConsumer}, {@link BeanSupplier},
* {@link BeanChannel}, and {@link ListBeanChannel}.
*/
-@SuppressWarnings({"java:S5778" /* assertThrows lambdas with chained calls; intermediate invocations do not throw in practice */})
+@SuppressWarnings({
+ "java:S5778" // assertThrows lambdas with chained calls; intermediate invocations do not throw in practice
+})
class BeanChannel_Test extends TestBase {
//------------------------------------------------------------------------------------------------------------------
@@ -39,7 +41,10 @@ class BeanChannel_Test extends TestBase {
assertEquals("hello", a.create());
}
- @Test @SuppressWarnings("rawtypes") void a02_beanFactory_void_throws() throws Exception {
+ @SuppressWarnings({
+ "rawtypes" // Raw types required for generic test utility.
+ })
+ @Test void a02_beanFactory_void_throws() throws Exception {
var ctor = BeanFactory.Void.class.getDeclaredConstructor();
ctor.setAccessible(true);
var instance = (BeanFactory) ctor.newInstance();
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/function/Memoizer_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/function/Memoizer_Test.java
index d04fd179df..eae4f92ed8 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/function/Memoizer_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/function/Memoizer_Test.java
@@ -24,8 +24,9 @@ import org.junit.jupiter.api.*;
import org.apache.juneau.commons.TestBase;
@SuppressWarnings({
- "cast", // Explicit cast needed for type testing
- "java:S2925" // Thread.sleep intentional for concurrency/race condition tests
+ "cast", // Explicit cast needed for type testing
+ "java:S2925", // Thread.sleep intentional for concurrency/race condition tests
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
})
class Memoizer_Test extends TestBase {
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/BasicBeanStore_PushPopOverlay_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/BasicBeanStore_PushPopOverlay_Test.java
index ece9e029af..76605c58d2 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/BasicBeanStore_PushPopOverlay_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/BasicBeanStore_PushPopOverlay_Test.java
@@ -31,7 +31,10 @@ import org.apache.juneau.commons.TestBase;
* happy-path lookup-shadow-then-restore semantics that the {@code JuneauBeanStoreExtension} Mode OVERLAY
* machinery depends on.
*/
-@SuppressWarnings({"java:S5778" /* assertThrows lambdas with chained calls; intermediate invocations do not throw in practice */})
+@SuppressWarnings({
+ "java:S5778", // assertThrows lambdas with chained calls; intermediate invocations do not throw in practice
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+})
class BasicBeanStore_PushPopOverlay_Test extends TestBase {
//-----------------------------------------------------------------------------------------------------------------
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/BasicBeanStore_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/BasicBeanStore_Test.java
index 3cf8c7ad20..0c7b8eeef5 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/BasicBeanStore_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/BasicBeanStore_Test.java
@@ -30,7 +30,8 @@ import org.apache.juneau.commons.TestBase;
@SuppressWarnings({
"java:S4144", // Identical test methods intentional for testing different scenarios
- "java:S114" // Snake_case fixture interface names (X_Iface, X_BasicIface) are intentional test-local naming.
+ "java:S114", // Snake_case fixture interface names (X_Iface, X_BasicIface) are intentional test-local naming.
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
})
class BasicBeanStore_Test extends TestBase {
@@ -1587,7 +1588,10 @@ class BasicBeanStore_Test extends TestBase {
public Z03_MixedFieldConfig() { /* intentionally empty */ }
public String nonBeanField = "ignored";
@Bean public TestBean tb = new TestBean("z03");
- @SuppressWarnings("unused") public String helperMethod() { return "not a bean"; }
+ @SuppressWarnings({
+ "unused" // Unused in this context; kept for API consistency or future use.
+ })
+ public String helperMethod() { return "not a bean"; }
@Bean public AnotherBean ab() { return new AnotherBean(7); }
}
@@ -1635,4 +1639,3 @@ class BasicBeanStore_Test extends TestBase {
"Cause must reference the duplicate-bean condition; got: " + ex.getCause().getMessage());
}
}
-
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/BeanAnnotation_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/BeanAnnotation_Test.java
index 2623983e08..b301a7cf5f 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/BeanAnnotation_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/BeanAnnotation_Test.java
@@ -28,7 +28,9 @@ import org.apache.juneau.commons.TestBase;
* <p>Asserts that the builder round-trips the basic attributes, including the
* {@link Bean#priority()} attribute that was added as part of the JSR-330 / Spring-lite work.
*/
-@SuppressWarnings({"java:S2094"})
+@SuppressWarnings({
+ "java:S2094" // Intentionally empty bean class used as test fixture.
+})
class BeanAnnotation_Test extends TestBase {
@Test
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/BeanInstantiator_OptionD_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/BeanInstantiator_OptionD_Test.java
index c8e7345a9a..c37318bc8b 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/BeanInstantiator_OptionD_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/BeanInstantiator_OptionD_Test.java
@@ -33,7 +33,10 @@ import org.apache.juneau.commons.TestBase;
* (d) a subtype's own exact builder still wins even when a constructor exists; and (e) plain POJOs are
* unaffected.
*/
-@SuppressWarnings("java:S2094") // Intentionally empty helper bean.
+@SuppressWarnings({
+ "java:S2094", // Intentionally empty helper bean.
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+})
class BeanInstantiator_OptionD_Test extends TestBase {
private BasicBeanStore beanStore;
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/BeanInstantiator_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/BeanInstantiator_Test.java
index 63c532d78b..5911e4a3f9 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/BeanInstantiator_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/BeanInstantiator_Test.java
@@ -33,7 +33,9 @@ import org.apache.juneau.commons.TestBase;
@SuppressWarnings({
"java:S1172", // Unused parameters in tests are intentional
- "java:S1186" // Empty test method intentional for framework testing
+ "java:S1186", // Empty test method intentional for framework testing
+ "resource", // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
})
class BeanInstantiator_Test extends TestBase {
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/Conditional_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/Conditional_Test.java
index 5299324d4f..6c85942d77 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/Conditional_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/Conditional_Test.java
@@ -36,7 +36,8 @@ import org.apache.juneau.commons.TestBase;
*/
@SuppressWarnings({
"java:S2094", // Empty fixture/config classes are intentional test fixtures.
- "java:S2093" // BasicBeanStore is AutoCloseable, but these try/finally blocks restore global Settings state, not the store; converting to try-with-resources would invoke store.close() (triggering @PreDestroy lifecycle these registration-semantics tests don't exercise) and dislocate the Settings setup/teardown.
+ "java:S2093", // BasicBeanStore is AutoCloseable, but these try/finally blocks restore global Settings state, not the store; converting to try-with-resources would invoke store.close() (triggering @PreDestroy lifecycle these registration-semantics tests don't exercise) and dislocate the Settings setup/teardown.
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
})
class Conditional_Test extends TestBase {
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/Configuration_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/Configuration_Test.java
index 46aafe4ea0..422cc8e695 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/Configuration_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/Configuration_Test.java
@@ -36,7 +36,10 @@ import org.apache.juneau.commons.TestBase;
* <li>Calling {@code registerConfiguration} on a non-{@code @Configuration} type fails fast.
* </ul>
*/
-@SuppressWarnings({"java:S2094"})
+@SuppressWarnings({
+ "java:S2094", // Intentionally empty bean class used as test fixture.
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+})
class Configuration_Test extends TestBase {
//------------------------------------------------------------------------------------------------
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/JsrSupport_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/JsrSupport_Test.java
index ece11df218..ab37126215 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/JsrSupport_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/JsrSupport_Test.java
@@ -32,7 +32,9 @@ import org.apache.juneau.commons.TestBase;
* bean-store / instantiator integration tests — namely {@code isSingletonAnnotation},
* {@code isProviderType}, and the null / negative paths.
*/
-@SuppressWarnings({"java:S2094"})
+@SuppressWarnings({
+ "java:S2094" // Intentionally empty bean class used as test fixture.
+})
class JsrSupport_Test extends TestBase {
//------------------------------------------------------------------------------------------------
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/Lifecycle_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/Lifecycle_Test.java
index d0ab3f2a13..e49217eb4c 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/Lifecycle_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/Lifecycle_Test.java
@@ -37,7 +37,11 @@ import org.apache.juneau.commons.TestBase;
* <li>Suppressed-exception aggregation when multiple destroyers throw.
* </ul>
*/
-@SuppressWarnings({"java:S2094"})
+@SuppressWarnings({
+ "java:S2094", // Intentionally empty bean class used as test fixture.
+ "resource", // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+})
class Lifecycle_Test extends TestBase {
//------------------------------------------------------------------------------------------------
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/PrimaryAndOrder_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/PrimaryAndOrder_Test.java
index 97f04a0626..6a6b167119 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/PrimaryAndOrder_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/PrimaryAndOrder_Test.java
@@ -33,7 +33,10 @@ import org.apache.juneau.commons.TestBase;
* <li>{@code @Bean#priority()} provides ordering in the absence of {@code @Order}.
* </ul>
*/
-@SuppressWarnings({"java:S2094"})
+@SuppressWarnings({
+ "java:S2094", // Intentionally empty bean class used as test fixture.
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+})
class PrimaryAndOrder_Test extends TestBase {
//------------------------------------------------------------------------------------------------
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/Snapshot_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/Snapshot_Test.java
index 6665b9b1ed..30f42bef7d 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/Snapshot_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/Snapshot_Test.java
@@ -26,6 +26,9 @@ import org.apache.juneau.commons.TestBase;
/**
* Tests for {@link Snapshot}.
*/
+@SuppressWarnings({
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+})
class Snapshot_Test extends TestBase {
//-----------------------------------------------------------------------------------------------------------------
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/StackOverlay_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/StackOverlay_Test.java
index 77e508b0c1..b6bdb75709 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/StackOverlay_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/StackOverlay_Test.java
@@ -27,6 +27,9 @@ import org.apache.juneau.commons.TestBase;
/**
* Tests for {@link StackOverlay}.
*/
+@SuppressWarnings({
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+})
class StackOverlay_Test extends TestBase {
//-----------------------------------------------------------------------------------------------------------------
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/Value_SupplierTypedFieldType_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/Value_SupplierTypedFieldType_Test.java
index 178d4d0386..e53bcb6547 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/Value_SupplierTypedFieldType_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/Value_SupplierTypedFieldType_Test.java
@@ -42,7 +42,10 @@ import org.apache.juneau.commons.TestBase;
* <li>{@code Optional<Supplier<T>>} nesting is not specially handled.
* </ul>
*/
-@SuppressWarnings({"java:S5778" /* assertThrows lambdas with chained calls; intermediate invocations do not throw in practice */})
+@SuppressWarnings({
+ "java:S5778", // assertThrows lambdas with chained calls; intermediate invocations do not throw in practice
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+})
class Value_SupplierTypedFieldType_Test extends TestBase {
private static final String P_KEY = "Value_SupplierTypedFieldType_Test.key";
@@ -102,7 +105,9 @@ class Value_SupplierTypedFieldType_Test extends TestBase {
Supplier<String> value;
}
- @SuppressWarnings("rawtypes")
+ @SuppressWarnings({
+ "rawtypes" // Raw types required for generic test utility.
+ })
public static class RawSupplierBean {
@Value("${" + P_KEY + ":default}")
Supplier value;
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/Value_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/Value_Test.java
index 8e37e14c4b..a820af44be 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/Value_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/inject/Value_Test.java
@@ -34,6 +34,9 @@ import org.apache.juneau.commons.TestBase;
* Covers Juneau's {@link Value @Value}, Spring's {@code @Value} (detected by FQN), and the negative
* paths around primitive-null and {@code @Value} + {@code @Inject} mutual exclusion.
*/
+@SuppressWarnings({
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+})
class Value_Test extends TestBase {
private static final String P_STRING = "Value_Test.string";
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/Console_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/Console_Test.java
index 77f6195d27..50a9894d88 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/Console_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/Console_Test.java
@@ -26,6 +26,9 @@ import org.apache.juneau.commons.TestBase;
/**
* Tests for {@link Console}.
*/
+@SuppressWarnings({
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+})
class Console_Test extends TestBase {
private PrintStream originalOut;
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/FileReaderBuilder_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/FileReaderBuilder_Test.java
index 22ecb9561d..e3d2b5a5ec 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/FileReaderBuilder_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/FileReaderBuilder_Test.java
@@ -27,6 +27,9 @@ import java.util.*;
import org.junit.jupiter.api.*;
import org.apache.juneau.commons.TestBase;
+@SuppressWarnings({
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+})
class FileReaderBuilder_Test extends TestBase {
private static final Path PATH = Paths.get("src/test/resources/files/Test3.properties");
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/LocalDir_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/LocalDir_Test.java
index eff57758c2..b7f1bcc3e9 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/LocalDir_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/LocalDir_Test.java
@@ -26,6 +26,9 @@ import org.junit.jupiter.params.*;
import org.junit.jupiter.params.provider.*;
import org.apache.juneau.commons.TestBase;
+@SuppressWarnings({
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+})
class LocalDir_Test extends TestBase {
private static final Path TEST_DIR = Paths.get("src/test/resources/files");
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/LocalFile_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/LocalFile_Test.java
index 22f9cf0123..3c51ffe02b 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/LocalFile_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/LocalFile_Test.java
@@ -30,7 +30,8 @@ import org.junit.jupiter.params.provider.*;
import org.apache.juneau.commons.TestBase;
@SuppressWarnings({
- "java:S4144" // Identical test methods intentional for testing different scenarios
+ "java:S4144", // Identical test methods intentional for testing different scenarios
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
})
class LocalFile_Test extends TestBase {
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/PathReaderBuilder_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/PathReaderBuilder_Test.java
index a95ac6ef4a..c449e955b3 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/PathReaderBuilder_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/PathReaderBuilder_Test.java
@@ -30,6 +30,9 @@ import org.apache.juneau.commons.TestBase;
/**
* Tests {@link PathReaderBuilder}.
*/
+@SuppressWarnings({
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+})
class PathReaderBuilder_Test extends TestBase {
private static final Path PATH = Paths.get("src/test/resources/files/Test3.properties");
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/ReaderInputStream_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/ReaderInputStream_Test.java
index d9ad98f79d..f89607c3f1 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/ReaderInputStream_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/ReaderInputStream_Test.java
@@ -25,7 +25,8 @@ import org.junit.jupiter.api.*;
import org.apache.juneau.commons.TestBase;
@SuppressWarnings({
- "resource" // Streams intentionally not closed in unit tests
+ "resource", // Streams intentionally not closed in unit tests
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
})
class ReaderInputStream_Test extends TestBase {
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/StringBuilderWriter_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/StringBuilderWriter_Test.java
index 1e1090c435..dc9ca94be7 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/StringBuilderWriter_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/io/StringBuilderWriter_Test.java
@@ -24,7 +24,8 @@ import org.junit.jupiter.api.*;
import org.apache.juneau.commons.TestBase;
@SuppressWarnings({
- "resource" // Writers intentionally not closed in unit tests
+ "resource", // Writers intentionally not closed in unit tests
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
})
class StringBuilderWriter_Test extends TestBase {
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/lang/Version_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/lang/Version_Test.java
index e3df3be97f..63eaf5865a 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/lang/Version_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/lang/Version_Test.java
@@ -30,7 +30,8 @@ import org.junit.jupiter.params.provider.*;
import org.apache.juneau.commons.TestBase;
@SuppressWarnings({
- "java:S4144" // Identical test methods intentional for testing different scenarios
+ "java:S4144", // Identical test methods intentional for testing different scenarios
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
})
class Version_Test extends TestBase {
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/logging/Logger_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/logging/Logger_Test.java
index e0cab3a2fe..5d5b89cf2d 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/logging/Logger_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/logging/Logger_Test.java
@@ -27,7 +27,9 @@ import org.apache.juneau.commons.TestBase;
/**
* Tests for {@link Logger}.
*/
-@SuppressWarnings({"java:S117"})
+@SuppressWarnings({
+ "java:S117" // Local variable name intentional for test readability.
+})
class Logger_Test extends TestBase {
private static Logger getLogger(String name) {
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/AnnotationInfo_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/AnnotationInfo_Test.java
index fb79bc6e40..418f5d538b 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/AnnotationInfo_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/AnnotationInfo_Test.java
@@ -27,10 +27,11 @@ import org.junit.jupiter.api.*;
import org.apache.juneau.commons.TestBase;
@SuppressWarnings({
- "unchecked", // Cast from Object to Map<String,Object> in annotation tests
+ "unchecked", // Cast from Object to Map<String,Object> in annotation tests
"java:S5961", // S1874: Intentional use of deprecated classes/methods in tests to verify deprecated functionality
"java:S1186", // Empty method body intentional for REST/proxy interface testing
- "java:S1874" // Intentional use of deprecated API to verify functionality
+ "java:S1874", // Intentional use of deprecated API to verify functionality
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
})
class AnnotationInfo_Test extends TestBase {
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/ConstructorInfo_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/ConstructorInfo_Test.java
index bab0342a0a..012f6dcb1e 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/ConstructorInfo_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/ConstructorInfo_Test.java
@@ -34,10 +34,12 @@ import org.junit.jupiter.api.*;
import org.apache.juneau.commons.TestBase;
@SuppressWarnings({
- "unchecked", // Cast from Object to List/Map/Set/Optional in constructor tests
+ "unchecked", // Cast from Object to List/Map/Set/Optional in constructor tests
"java:S4144", // Identical methods intentional for different test scenarios
"java:S1186", // Empty method body intentional for callback testing
- "java:S1172" // Unused parameters kept for API consistency or framework requirements
+ "java:S1172", // Unused parameters kept for API consistency or framework requirements
+ "resource", // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
})
class ConstructorInfo_Test extends TestBase {
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/MethodInfo_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/MethodInfo_Test.java
index 038059118e..3a17571402 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/MethodInfo_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/MethodInfo_Test.java
@@ -34,9 +34,11 @@ import org.apache.juneau.commons.TestBase;
@SuppressWarnings({
"java:S1186", // Field names use underscores for test data (e.g., a_m, c_a1); unused parameters in tests are typically intentional
- "java:S116", // Field names use underscores for test data clarity
+ "java:S116", // Field names use underscores for test data clarity
"java:S3008", // Static field names use underscore-separated test-group prefixes (e.g. a_m, c_a1, f_get) for test fixture organization
"java:S1172", // Unused parameters kept for API consistency or framework requirements
+ "resource", // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
})
class MethodInfo_Test extends TestBase {
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/ParameterInfo_OptionalValue_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/ParameterInfo_OptionalValue_Test.java
index bd0a11f0eb..8056a456f9 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/ParameterInfo_OptionalValue_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/ParameterInfo_OptionalValue_Test.java
@@ -34,6 +34,9 @@ import org.apache.juneau.commons.TestBase;
* {@link IllegalArgumentException} at reflective invoke because {@link ParameterInfo#resolveValue}
* returned the unwrapped scalar instead of an {@link Optional}.
*/
+@SuppressWarnings({
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+})
class ParameterInfo_OptionalValue_Test extends TestBase {
private static final String KEY = "ParameterInfo_OptionalValue_Test.key";
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/ParameterInfo_Resolution_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/ParameterInfo_Resolution_Test.java
index 6bb8afa7b4..134181a629 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/ParameterInfo_Resolution_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/ParameterInfo_Resolution_Test.java
@@ -35,6 +35,10 @@ import org.apache.juneau.commons.TestBase;
* <li>The {@code resolveValue(BeanStore, Object enclosingInstance, Object... otherBeans)} overload
* </ul>
*/
+@SuppressWarnings({
+ "resource", // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+})
class ParameterInfo_Resolution_Test extends TestBase {
//-----------------------------------------------------------------------------------------------------------------
@@ -348,7 +352,9 @@ class ParameterInfo_Resolution_Test extends TestBase {
var r = pi.resolveValue(bs);
assertTrue(r instanceof Provider);
// Calling get() resolves the bean.
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({
+ "unchecked" // Unchecked cast required for generic test utility.
+ })
var p = (Provider<MyService>) r;
assertSame(inst, p.get());
}
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/ParameterInfo_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/ParameterInfo_Test.java
index 38e85fd2ec..2cbf7202ec 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/ParameterInfo_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/ParameterInfo_Test.java
@@ -35,12 +35,14 @@ import org.junit.jupiter.api.*;
import org.apache.juneau.commons.TestBase;
@SuppressWarnings({
- "java:S117", // Field names use underscores for test data (e.g., b_b_a, b_a1_a); unused parameters in tests are typically intentional
+ "java:S117", // Field names use underscores for test data (e.g., b_b_a, b_a1_a); unused parameters in tests are typically intentional
"java:S5961", // High assertion count acceptable in comprehensive tests
"java:S1186", // Empty method body intentional for callback testing
- "java:S116", // Field names use underscores for test data clarity
+ "java:S116", // Field names use underscores for test data clarity
"java:S1172", // Unused parameters kept for API consistency or framework requirements
"java:S3008", // Static field names use underscores for test data clarity
+ "resource", // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
})
class ParameterInfo_Test extends TestBase {
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/ReflectionMap_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/ReflectionMap_Test.java
index 9ad0b463c9..38679aebfe 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/ReflectionMap_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/ReflectionMap_Test.java
@@ -28,7 +28,8 @@ import org.apache.juneau.commons.TestBase;
@SuppressWarnings({
"java:S117", // Local variable names use underscores for test data
- "rawtypes" // Raw types used for generic testing scenarios
+ "rawtypes", // Raw types used for generic testing scenarios
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
})
class ReflectionMap_Test extends TestBase {
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/ReflectionUtils_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/ReflectionUtils_Test.java
index ca361231d8..f8e134fbee 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/ReflectionUtils_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/ReflectionUtils_Test.java
@@ -24,7 +24,8 @@ import org.junit.jupiter.api.*;
import org.apache.juneau.commons.TestBase;
@SuppressWarnings({
- "java:S1186" // Empty test method intentional for framework testing
+ "java:S1186", // Empty test method intentional for framework testing
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
})
class ReflectionUtils_Test extends TestBase {
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/svl/ArgCoercer_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/svl/ArgCoercer_Test.java
index 4aa1ccb79d..9e8966dc96 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/svl/ArgCoercer_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/svl/ArgCoercer_Test.java
@@ -30,7 +30,9 @@ import org.apache.juneau.commons.TestBase;
* Drives {@link ArgCoercer} indirectly through {@link TypedFunction} subclasses so the integration
* path (function dispatch → coercion → typed invoke) is exercised end-to-end.
*/
-@SuppressWarnings({"java:S5778" /* assertThrows lambdas with chained calls; intermediate invocations do not throw in practice */})
+@SuppressWarnings({
+ "java:S5778" // assertThrows lambdas with chained calls; intermediate invocations do not throw in practice
+})
class ArgCoercer_Test extends TestBase {
public static class IntFn extends TypedFunction {
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/svl/VarFunction_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/svl/VarFunction_Test.java
index b6c8a64d9d..18d7dcd561 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/svl/VarFunction_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/svl/VarFunction_Test.java
@@ -27,7 +27,9 @@ import org.apache.juneau.commons.TestBase;
* Tests the {@link VarFunction} SPI + {@link TypedFunction} reflection-based dispatch +
* builder registration + lazy-fail for unknown functions.
*/
-@SuppressWarnings({"java:S5778" /* assertThrows lambdas with chained calls; intermediate invocations do not throw in practice */})
+@SuppressWarnings({
+ "java:S5778" // assertThrows lambdas with chained calls; intermediate invocations do not throw in practice
+})
class VarFunction_Test extends TestBase {
/** Simple typed-function: upper-case its single string arg. */
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/svl/VarResolverSession_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/svl/VarResolverSession_Test.java
index b820d9ddd1..cfc4af4e59 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/svl/VarResolverSession_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/svl/VarResolverSession_Test.java
@@ -35,6 +35,9 @@ import org.apache.juneau.commons.TestBase;
* <li>{@link VarResolverSession#bean(Class, Object)} / {@link VarResolverSession#getBean(Class)} / fallback to context store
* </ul>
*/
+@SuppressWarnings({
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+})
class VarResolverSession_Test extends TestBase {
//-----------------------------------------------------------------------------------------------------------------
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/svl/functions/MiniJson_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/svl/functions/MiniJson_Test.java
index a87983127d..cbafb75703 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/svl/functions/MiniJson_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/svl/functions/MiniJson_Test.java
@@ -175,14 +175,18 @@ class MiniJson_Test extends TestBase {
assertEquals(new LinkedHashMap<>(), MiniJson.parse("{ }"));
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({
+ "unchecked" // Unchecked cast required for generic test utility.
+ })
@Test void d03_parse_simpleObject() {
var m = (Map<String, Object>) MiniJson.parse("{\"a\":1}");
assertEquals(1L, m.get("a"));
assertEquals(1, m.size());
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({
+ "unchecked" // Unchecked cast required for generic test utility.
+ })
@Test void d04_parse_multipleEntries() {
var m = (Map<String, Object>) MiniJson.parse("{\"a\":1,\"b\":2,\"c\":3}");
assertEquals(3, m.size());
@@ -191,7 +195,9 @@ class MiniJson_Test extends TestBase {
assertEquals(3L, m.get("c"));
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({
+ "unchecked" // Unchecked cast required for generic test utility.
+ })
@Test void d05_parse_nestedObject() {
var m = (Map<String, Object>) MiniJson.parse("{\"a\":{\"b\":\"c\"}}");
var inner = (Map<String, Object>) m.get("a");
@@ -207,7 +213,9 @@ class MiniJson_Test extends TestBase {
}
@Test void d08_parse_objectInsertionOrderPreserved() {
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({
+ "unchecked" // Unchecked cast required for generic test utility.
+ })
var m = (Map<String, Object>) MiniJson.parse("{\"z\":1,\"a\":2,\"m\":3}");
assertEquals(List.of("z", "a", "m"), new ArrayList<>(m.keySet()));
}
@@ -229,7 +237,9 @@ class MiniJson_Test extends TestBase {
}
@Test void e04_parse_arrayMixedTypes() {
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({
+ "unchecked" // Unchecked cast required for generic test utility.
+ })
var l = (List<Object>) MiniJson.parse("[1,\"two\",true,null]");
assertEquals(4, l.size());
assertEquals(1L, l.get(0));
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/utils/AnnotationUtils_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/utils/AnnotationUtils_Test.java
index da60e5c516..1f2c7ee2c8 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/utils/AnnotationUtils_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/utils/AnnotationUtils_Test.java
@@ -25,7 +25,8 @@ import java.util.*;
import org.junit.jupiter.api.*;
@SuppressWarnings({
- "java:S5961" // High assertion count acceptable in comprehensive test
+ "java:S5961", // High assertion count acceptable in comprehensive test
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
})
class AnnotationUtils_Test {
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/utils/ClassUtils_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/utils/ClassUtils_Test.java
index d0ab008809..214e28d1d7 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/utils/ClassUtils_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/utils/ClassUtils_Test.java
@@ -28,7 +28,9 @@ import java.util.*;
import org.apache.juneau.commons.reflect.*;
import org.junit.jupiter.api.*;
-@SuppressWarnings({"unused"})
+@SuppressWarnings({
+ "unused" // Unused in this context; kept for API consistency or future use.
+})
class ClassUtils_Test {
//====================================================================================================
@@ -452,4 +454,3 @@ class ClassUtils_Test {
assertNull(result2);
}
}
-
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/utils/FileUtils_ResolveSafely_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/utils/FileUtils_ResolveSafely_Test.java
index 691c33bca2..d29b9684e0 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/utils/FileUtils_ResolveSafely_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/utils/FileUtils_ResolveSafely_Test.java
@@ -36,6 +36,9 @@ import org.apache.juneau.commons.TestBase;
* here exercise the shared semantic invariants directly so the per-resource regression suites
* can focus on caller-layer behavior (HTTP status codes, response shape).
*/
+@SuppressWarnings({
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
+})
class FileUtils_ResolveSafely_Test extends TestBase {
@TempDir
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/utils/StringUtils_Test.java b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/utils/StringUtils_Test.java
index 219d281301..7da50a4473 100755
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/utils/StringUtils_Test.java
+++ b/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/utils/StringUtils_Test.java
@@ -40,8 +40,9 @@ import org.apache.juneau.commons.TestBase;
@SuppressWarnings({
"java:S5961", // High assertion count acceptable in comprehensive test
- "java:S125", // Commented code kept for test documentation
- "serial" // Serialization not relevant in test code
+ "java:S125", // Commented code kept for test documentation
+ "serial", // Serialization not relevant in test code
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
})
class StringUtils_Test extends TestBase {
diff --git a/juneau-core/juneau-config/src/test/java/org/apache/juneau/TestUtils.java b/juneau-core/juneau-config/src/test/java/org/apache/juneau/TestUtils.java
index bde0415d5c..23459a2b91 100644
--- a/juneau-core/juneau-config/src/test/java/org/apache/juneau/TestUtils.java
+++ b/juneau-core/juneau-config/src/test/java/org/apache/juneau/TestUtils.java
@@ -31,7 +31,6 @@ import java.util.stream.*;
import org.apache.juneau.commons.bean.*;
import org.apache.juneau.commons.utils.*;
-import org.apache.juneau.junit.bct.*;
import org.apache.juneau.marshall.serializer.*;
import org.apache.juneau.marshall.xml.*;
import org.junit.jupiter.api.*;
@@ -44,7 +43,8 @@ import org.junit.jupiter.api.*;
*/
@SuppressWarnings({
"unchecked", // BeanTester cast and generic type handling in test utilities
- "java:S1172" // Parameters kept for consistent method signatures across test utilities
+ "java:S1172", // Parameters kept for consistent method signatures across test utilities
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
})
public class TestUtils extends Utils {
@@ -92,7 +92,9 @@ public class TestUtils extends Utils {
/**
* Validates that the whitespace is correct in the specified XML.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void checkXmlWhitespace(String out) throws Exception {
if (out.indexOf('\u0000') != -1) {
for (var s : out.split("\u0000"))
@@ -265,7 +267,9 @@ public class TestUtils extends Utils {
/**
* Validates XML whitespace and namespace formatting on a serialized object.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void validateXml(Object o) throws Exception {
validateXml(o, XmlSerializer.DEFAULT_NS_SQ);
}
@@ -273,7 +277,9 @@ public class TestUtils extends Utils {
/**
* Validates XML whitespace and namespace formatting on a serialized object.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void validateXml(Object o, XmlSerializer s) throws Exception {
s = s.copy().ws().ns().addNamespaceUrisToRoot().build();
var xml = s.serialize(o);
@@ -303,7 +309,7 @@ public class TestUtils extends Utils {
if (tagEnd == -1) break;
var tag = html.substring(i, tagEnd + 1);
var matches = withAttributes == null || withAttributes.isEmpty();
- if (!matches) {
+ if (!matches && withAttributes != null) {
matches = true;
for (var entry : withAttributes.entrySet()) {
if (!tag.contains(entry.getKey() + "=\"" + entry.getValue() + "\"") && !tag.contains(entry.getKey() + "='" + entry.getValue() + "'")) {
diff --git a/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigBuilder_Test.java b/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigBuilder_Test.java
index aaa0eb7905..b066df1984 100644
--- a/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigBuilder_Test.java
+++ b/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigBuilder_Test.java
@@ -29,8 +29,9 @@ import org.apache.juneau.config.store.*;
import org.junit.jupiter.api.*;
@SuppressWarnings({
- "java:S116", // Field names use underscores for test data
- "java:S3008" // Static field TEMP_DIR uses UPPER_CASE convention; non-constant semantics require suppression
+ "java:S116", // Field names use underscores for test data
+ "java:S3008", // Static field TEMP_DIR uses UPPER_CASE convention; non-constant semantics require suppression
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
})
class ConfigBuilder_Test extends TestBase {
diff --git a/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigImportsTest.java b/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigImportsTest.java
index 4a3ef1a7b0..c2fea10633 100644
--- a/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigImportsTest.java
+++ b/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigImportsTest.java
@@ -28,6 +28,9 @@ import org.junit.jupiter.api.*;
/**
* Validates aspects of config imports.
*/
+@SuppressWarnings({
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+})
class ConfigImportsTest extends TestBase {
//-----------------------------------------------------------------------------------------------------------------
diff --git a/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigMapListener_Test.java b/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigMapListener_Test.java
index 39210a05f4..b83cc71a8d 100644
--- a/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigMapListener_Test.java
+++ b/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigMapListener_Test.java
@@ -31,7 +31,9 @@ import org.apache.juneau.marshall.*;
import org.junit.jupiter.api.*;
@SuppressWarnings({
- "java:S1186" // Empty test method intentional for framework testing
+ "java:S1186", // Empty test method intentional for framework testing
+ "resource", // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
})
class ConfigMapListener_Test extends TestBase {
diff --git a/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigMap_Test.java b/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigMap_Test.java
index 20613d6b3f..a7503d0b4a 100644
--- a/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigMap_Test.java
+++ b/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigMap_Test.java
@@ -29,7 +29,8 @@ import org.apache.juneau.marshall.*;
import org.junit.jupiter.api.*;
@SuppressWarnings({
- "java:S4144" // Identical test methods intentional for testing different scenarios
+ "java:S4144", // Identical test methods intentional for testing different scenarios
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
})
class ConfigMap_Test extends TestBase {
diff --git a/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigPropertySourceProvider_Test.java b/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigPropertySourceProvider_Test.java
index 92ada2eee9..e5f9009100 100644
--- a/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigPropertySourceProvider_Test.java
+++ b/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigPropertySourceProvider_Test.java
@@ -37,7 +37,8 @@ import org.junit.jupiter.api.*;
* </ol>
*/
@SuppressWarnings({
- "java:S2094" // Test fixture / data class, no methods required.
+ "java:S2094", // Test fixture / data class, no methods required.
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
})
class ConfigPropertySourceProvider_Test extends TestBase {
diff --git a/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigPropertySource_Test.java b/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigPropertySource_Test.java
index 0c2a968fde..63e8e543dd 100644
--- a/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigPropertySource_Test.java
+++ b/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigPropertySource_Test.java
@@ -22,6 +22,9 @@ import org.apache.juneau.*;
import org.apache.juneau.config.store.*;
import org.junit.jupiter.api.*;
+@SuppressWarnings({
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+})
class ConfigPropertySource_Test extends TestBase {
private Config build(String...lines) {
diff --git a/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigYamlFormat_Test.java b/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigYamlFormat_Test.java
index bee8665836..d8abac351d 100644
--- a/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigYamlFormat_Test.java
+++ b/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/ConfigYamlFormat_Test.java
@@ -27,7 +27,8 @@ import org.apache.juneau.config.store.*;
import org.junit.jupiter.api.*;
@SuppressWarnings({
- "java:S1130" // Test methods use the project-standard broad 'throws Exception' signature; narrowing each to the specific checked type (IOException) is high-churn/low-value.
+ "java:S1130", // Test methods use the project-standard broad 'throws Exception' signature; narrowing each to the specific checked type (IOException) is high-churn/low-value.
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
})
class ConfigYamlFormat_Test extends TestBase {
diff --git a/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/Config_Test.java b/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/Config_Test.java
index b7f9ccddef..93141eb810 100644
--- a/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/Config_Test.java
+++ b/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/Config_Test.java
@@ -40,12 +40,13 @@ import org.apache.juneau.marshall.uon.*;
import org.junit.jupiter.api.*;
@SuppressWarnings({
- "rawtypes", // Raw types used for generic testing scenarios
+ "rawtypes", // Raw types used for generic testing scenarios
"unchecked", // Cast from Object to List/Map in config tests
"java:S5778", // assertThrows lambdas with chained calls; intermediate invocations do not throw in practice
- "java:S114", // Test-local helper interfaces use the documented LNN_ClassName convention (underscore separates the test-method prefix from the descriptive name).
+ "java:S114", // Test-local helper interfaces use the documented LNN_ClassName convention (underscore separates the test-method prefix from the descriptive name).
"java:S1130", // Test methods use the project-standard broad 'throws Exception' signature; narrowing each to specific checked types is high-churn/low-value.
- "java:S5976" // Explicit per-case tests are clearer and self-documenting than a parameterized table; intentional.
+ "java:S5976", // Explicit per-case tests are clearer and self-documenting than a parameterized table; intentional.
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
})
class Config_Test extends TestBase {
diff --git a/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/store/ConfigClasspathStore_Test.java b/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/store/ConfigClasspathStore_Test.java
index 1afa60d552..cefb06e213 100644
--- a/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/store/ConfigClasspathStore_Test.java
+++ b/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/store/ConfigClasspathStore_Test.java
@@ -24,6 +24,9 @@ import java.util.concurrent.*;
import org.apache.juneau.*;
import org.junit.jupiter.api.*;
+@SuppressWarnings({
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+})
class ConfigClasspathStore_Test extends TestBase {
@Test void a01_noFile() throws Exception {
diff --git a/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/store/ConfigFileStoreTest.java b/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/store/ConfigFileStoreTest.java
index 8a2e7963cf..805719969b 100644
--- a/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/store/ConfigFileStoreTest.java
+++ b/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/store/ConfigFileStoreTest.java
@@ -28,6 +28,9 @@ import org.apache.juneau.*;
import org.apache.juneau.marshall.*;
import org.junit.jupiter.api.*;
+@SuppressWarnings({
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+})
class ConfigFileStoreTest extends TestBase {
private static final File DIR = new File("./target/config");
diff --git a/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/store/ConfigMemoryStore_Test.java b/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/store/ConfigMemoryStore_Test.java
index 746e8814a0..fa71984c66 100644
--- a/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/store/ConfigMemoryStore_Test.java
+++ b/juneau-core/juneau-config/src/test/java/org/apache/juneau/config/store/ConfigMemoryStore_Test.java
@@ -23,6 +23,9 @@ import java.util.concurrent.*;
import org.apache.juneau.*;
import org.junit.jupiter.api.*;
+@SuppressWarnings({
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+})
class ConfigMemoryStore_Test extends TestBase {
@Test void a01_noFile() {
diff --git a/juneau-core/juneau-config/src/test/java/org/apache/juneau/utest/utils/FakeStreamParser.java b/juneau-core/juneau-config/src/test/java/org/apache/juneau/utest/utils/FakeStreamParser.java
index 121e29580e..c8267e53d6 100644
--- a/juneau-core/juneau-config/src/test/java/org/apache/juneau/utest/utils/FakeStreamParser.java
+++ b/juneau-core/juneau-config/src/test/java/org/apache/juneau/utest/utils/FakeStreamParser.java
@@ -74,6 +74,9 @@ public class FakeStreamParser extends InputStreamParser {
}
@Override
+ @SuppressWarnings({
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+ })
public <T> T doParse(ParserSession session, ParserPipe pipe, ClassMeta<T> type) throws IOException, ParseException, ExecutableException {
if (function != null)
return type.cast(function.apply((InputStreamParserSession)session, readBytes(pipe.getInputStream()), type));
diff --git a/juneau-core/juneau-config/src/test/java/org/apache/juneau/utest/utils/FakeStreamSerializer.java b/juneau-core/juneau-config/src/test/java/org/apache/juneau/utest/utils/FakeStreamSerializer.java
index e529c0dc95..c118524334 100644
--- a/juneau-core/juneau-config/src/test/java/org/apache/juneau/utest/utils/FakeStreamSerializer.java
+++ b/juneau-core/juneau-config/src/test/java/org/apache/juneau/utest/utils/FakeStreamSerializer.java
@@ -84,6 +84,9 @@ public class FakeStreamSerializer extends OutputStreamSerializer {
}
@Override /* SerializerSession */
+ @SuppressWarnings({
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+ })
protected void doSerialize(SerializerSession session, SerializerPipe out, Object o) throws IOException, SerializeException {
out.getOutputStream().write(function.apply(session, o));
}
diff --git a/juneau-core/juneau-config/src/test/java/org/apache/juneau/utest/utils/FakeWriterSerializer.java b/juneau-core/juneau-config/src/test/java/org/apache/juneau/utest/utils/FakeWriterSerializer.java
index 7100b26a9d..2c10fa2517 100644
--- a/juneau-core/juneau-config/src/test/java/org/apache/juneau/utest/utils/FakeWriterSerializer.java
+++ b/juneau-core/juneau-config/src/test/java/org/apache/juneau/utest/utils/FakeWriterSerializer.java
@@ -122,6 +122,9 @@ public class FakeWriterSerializer extends WriterSerializer implements HttpPartSe
}
@Override /* SerializerSession */
+ @SuppressWarnings({
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+ })
protected void doSerialize(SerializerSession session, SerializerPipe out, Object o) throws IOException, SerializeException {
out.getWriter().write(function.apply((WriterSerializerSession)session,o));
}
diff --git a/juneau-core/juneau-junit5/src/test/java/org/apache/juneau/org/apache/juneau/TestBase.java b/juneau-core/juneau-junit5/src/test/java/org/apache/juneau/TestBase.java
similarity index 100%
copy from juneau-core/juneau-junit5/src/test/java/org/apache/juneau/org/apache/juneau/TestBase.java
copy to juneau-core/juneau-junit5/src/test/java/org/apache/juneau/TestBase.java
diff --git a/juneau-core/juneau-junit5/src/test/java/org/apache/juneau/junit5/JuneauBeanStoreExtension_Test.java b/juneau-core/juneau-junit5/src/test/java/org/apache/juneau/junit5/JuneauBeanStoreExtension_Test.java
index 9a14a47977..abb1b9345a 100644
--- a/juneau-core/juneau-junit5/src/test/java/org/apache/juneau/junit5/JuneauBeanStoreExtension_Test.java
+++ b/juneau-core/juneau-junit5/src/test/java/org/apache/juneau/junit5/JuneauBeanStoreExtension_Test.java
@@ -38,7 +38,9 @@ import org.junit.jupiter.api.extension.*;
* spawning a nested JUnit launcher.
*/
@ExtendWith(JuneauBeanStoreExtension.class)
-@SuppressWarnings({"java:S5778" /* assertThrows lambdas with chained calls; intermediate invocations do not throw in practice */})
+@SuppressWarnings({
+ "java:S5778" // assertThrows lambdas with chained calls; intermediate invocations do not throw in practice
+})
class JuneauBeanStoreExtension_Test extends TestBase {
//-----------------------------------------------------------------------------------------------------------------
diff --git a/juneau-core/juneau-junit5/src/test/java/org/apache/juneau/junit5/TestBeanStore_Test.java b/juneau-core/juneau-junit5/src/test/java/org/apache/juneau/junit5/TestBeanStore_Test.java
index f757f8ba57..83aac5c6cb 100644
--- a/juneau-core/juneau-junit5/src/test/java/org/apache/juneau/junit5/TestBeanStore_Test.java
+++ b/juneau-core/juneau-junit5/src/test/java/org/apache/juneau/junit5/TestBeanStore_Test.java
@@ -33,6 +33,7 @@ import org.junit.jupiter.api.*;
* mechanism. The framework wiring (Args.overridingParent, MockRestClient.overridingBeanStore)
* is exercised by sibling tests; this test concentrates on the {@link TestBeanStore} surface.
*/
+@SuppressWarnings("resource") // TestBeanStore instances are short-lived in-memory test fixtures; closing is irrelevant to these assertions.
class TestBeanStore_Test extends TestBase {
//-----------------------------------------------------------------------------------------------------------------
@@ -110,7 +111,9 @@ class TestBeanStore_Test extends TestBase {
// c — supplier-based overrides
//-----------------------------------------------------------------------------------------------------------------
- @SuppressWarnings("java:S125") // Explanatory prose on overload-resolution; not dead code.
+ @SuppressWarnings({
+ "java:S125" // Explanatory prose on overload-resolution; not dead code.
+ })
@Test
void c01_supplier_invokedLazily() {
var calls = new AtomicInteger();
diff --git a/juneau-core/juneau-marshall-rdf/pom.xml b/juneau-core/juneau-marshall-rdf/pom.xml
index 1180c831c5..bb29fef381 100644
--- a/juneau-core/juneau-marshall-rdf/pom.xml
+++ b/juneau-core/juneau-marshall-rdf/pom.xml
@@ -55,6 +55,24 @@
<artifactId>jena-arq</artifactId>
<version>${jena.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${junit.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.juneau</groupId>
+ <artifactId>juneau-junit5</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.juneau</groupId>
+ <artifactId>juneau-test-utils</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
diff --git a/juneau-core/juneau-marshall-rdf/src/test/java/org/apache/juneau/marshall/jena/RdfAnnotation_Test.java b/juneau-core/juneau-marshall-rdf/src/test/java/org/apache/juneau/marshall/jena/RdfAnnotation_Test.java
new file mode 100644
index 0000000000..432cd2895a
--- /dev/null
+++ b/juneau-core/juneau-marshall-rdf/src/test/java/org/apache/juneau/marshall/jena/RdfAnnotation_Test.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.juneau.marshall.jena;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+import org.apache.juneau.*;
+import org.junit.jupiter.api.*;
+
+class RdfAnnotation_Test extends TestBase {
+
+ @Test void a01_defaults() {
+ var x = RdfAnnotation.create().build();
+ assertFalse(x.beanUri());
+ assertEquals(RdfCollectionFormat.DEFAULT, x.collectionFormat());
+ assertEquals("", x.prefix());
+ assertEquals("", x.namespace());
+ }
+
+ @Test void a02_beanUri() {
+ var x = RdfAnnotation.create().beanUri(true).build();
+ assertTrue(x.beanUri());
+ }
+
+ @Test void a03_beanUri_false() {
+ var x = RdfAnnotation.create().beanUri(false).build();
+ assertFalse(x.beanUri());
+ }
+
+ @Test void a04_collectionFormat_bag() {
+ var x = RdfAnnotation.create().collectionFormat(RdfCollectionFormat.BAG).build();
+ assertEquals(RdfCollectionFormat.BAG, x.collectionFormat());
+ }
+
+ @Test void a05_collectionFormat_list() {
+ var x = RdfAnnotation.create().collectionFormat(RdfCollectionFormat.LIST).build();
+ assertEquals(RdfCollectionFormat.LIST, x.collectionFormat());
+ }
+
+ @Test void a06_collectionFormat_seq() {
+ var x = RdfAnnotation.create().collectionFormat(RdfCollectionFormat.SEQ).build();
+ assertEquals(RdfCollectionFormat.SEQ, x.collectionFormat());
+ }
+
+ @Test void a07_namespace() {
+ var x = RdfAnnotation.create().namespace("http://foo/").build();
+ assertEquals("http://foo/", x.namespace());
+ }
+
+ @Test void a08_prefix() {
+ var x = RdfAnnotation.create().prefix("foo").build();
+ assertEquals("foo", x.prefix());
+ }
+
+ @Test void a13_prefix_and_namespace() {
+ var x = RdfAnnotation.create().prefix("foo").namespace("http://foo/").build();
+ assertEquals("foo", x.prefix());
+ assertEquals("http://foo/", x.namespace());
+ }
+
+ @Test void a16_default_constant() {
+ assertNotNull(RdfAnnotation.DEFAULT);
+ assertFalse(RdfAnnotation.DEFAULT.beanUri());
+ assertEquals(RdfCollectionFormat.DEFAULT, RdfAnnotation.DEFAULT.collectionFormat());
+ }
+}
diff --git a/juneau-core/juneau-marshall-rdf/src/test/java/org/apache/juneau/marshall/jena/RdfConfigAnnotation_Test.java b/juneau-core/juneau-marshall-rdf/src/test/java/org/apache/juneau/marshall/jena/RdfConfigAnnotation_Test.java
new file mode 100644
index 0000000000..9ffe3d6297
--- /dev/null
+++ b/juneau-core/juneau-marshall-rdf/src/test/java/org/apache/juneau/marshall/jena/RdfConfigAnnotation_Test.java
@@ -0,0 +1,341 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.juneau.marshall.jena;
+
+import static org.apache.juneau.commons.utils.CollectionUtils.*;
+import static org.junit.jupiter.api.Assertions.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.commons.reflect.*;
+import org.apache.juneau.commons.svl.*;
+import org.apache.juneau.marshall.*;
+import org.junit.jupiter.api.*;
+
+class RdfConfigAnnotation_Test extends TestBase {
+
+ static VarResolverSession sr = VarResolver.create().vars(XVar.class).build().createSession();
+
+ //-----------------------------------------------------------------------------------------------------------------
+ // language
+ //-----------------------------------------------------------------------------------------------------------------
+
+ @RdfConfig(language = "N-TRIPLE")
+ static class A {}
+ static ClassInfo a = ClassInfo.of(A.class);
+
+ @Test void a01_language_serializer() {
+ var al = AnnotationWorkList.of(sr, rstream(a.getAnnotations()));
+ var x = RdfSerializer.create().apply(al).build().getSession();
+ assertEquals("N-TRIPLE", x.getLanguage());
+ }
+
+ @RdfConfig(language = "TURTLE")
+ static class B {}
+ static ClassInfo b = ClassInfo.of(B.class);
+
+ @Test void a02_language_parser() {
+ var al = AnnotationWorkList.of(sr, rstream(b.getAnnotations()));
+ var x = RdfParser.create().apply(al).build().getSession();
+ assertEquals("TURTLE", x.getLanguage());
+ }
+
+ //-----------------------------------------------------------------------------------------------------------------
+ // addLiteralTypes
+ //-----------------------------------------------------------------------------------------------------------------
+
+ @RdfConfig(addLiteralTypes = "true")
+ static class C {}
+ static ClassInfo c = ClassInfo.of(C.class);
+
+ @Test void a03_addLiteralTypes() {
+ var al = AnnotationWorkList.of(sr, rstream(c.getAnnotations()));
+ var x = RdfSerializer.create().apply(al).build().getSession();
+ assertTrue(x.isAddLiteralTypes());
+ }
+
+ //-----------------------------------------------------------------------------------------------------------------
+ // addRootProperty
+ //-----------------------------------------------------------------------------------------------------------------
+
+ @RdfConfig(addRootProperty = "true")
+ static class D {}
+ static ClassInfo d = ClassInfo.of(D.class);
+
+ @Test void a04_addRootProperty() {
+ var al = AnnotationWorkList.of(sr, rstream(d.getAnnotations()));
+ var x = RdfSerializer.create().apply(al).build().getSession();
+ assertTrue(x.isAddRootProp());
+ }
+
+ //-----------------------------------------------------------------------------------------------------------------
+ // looseCollections
+ //-----------------------------------------------------------------------------------------------------------------
+
+ @RdfConfig(looseCollections = "true")
+ static class E {}
+ static ClassInfo e = ClassInfo.of(E.class);
+
+ @Test void a05_looseCollections_serializer() {
+ var al = AnnotationWorkList.of(sr, rstream(e.getAnnotations()));
+ var x = RdfSerializer.create().apply(al).build().getSession();
+ assertTrue(x.isLooseCollections());
+ }
+
+ @Test void a06_looseCollections_parser() {
+ var al = AnnotationWorkList.of(sr, rstream(e.getAnnotations()));
+ // Parser applies looseCollections; verify build does not throw
+ assertDoesNotThrow(() -> RdfParser.create().apply(al).build());
+ }
+
+ //-----------------------------------------------------------------------------------------------------------------
+ // collectionFormat
+ //-----------------------------------------------------------------------------------------------------------------
+
+ @RdfConfig(collectionFormat = "BAG")
+ static class F {}
+ static ClassInfo f = ClassInfo.of(F.class);
+
+ @Test void a07_collectionFormat_serializer() {
+ var al = AnnotationWorkList.of(sr, rstream(f.getAnnotations()));
+ var x = RdfSerializer.create().apply(al).build().getSession();
+ assertEquals(RdfCollectionFormat.BAG, x.getCollectionFormat());
+ }
+
+ @RdfConfig(collectionFormat = "LIST")
+ static class G {}
+ static ClassInfo g = ClassInfo.of(G.class);
+
+ @Test void a08_collectionFormat_parser() {
+ var al = AnnotationWorkList.of(sr, rstream(g.getAnnotations()));
+ // Parser applies collectionFormat; verify build does not throw
+ assertDoesNotThrow(() -> RdfParser.create().apply(al).build());
+ }
+
+ //-----------------------------------------------------------------------------------------------------------------
+ // Empty annotation (defaults)
+ //-----------------------------------------------------------------------------------------------------------------
+
+ @RdfConfig()
+ static class H {}
+ static ClassInfo h = ClassInfo.of(H.class);
+
+ @Test void a09_noValues_serializer() {
+ var al = AnnotationWorkList.of(sr, rstream(h.getAnnotations()));
+ var x = RdfSerializer.create().apply(al).build().getSession();
+ assertEquals("RDF/XML-ABBREV", x.getLanguage());
+ }
+
+ @Test void a10_noValues_parser() {
+ var al = AnnotationWorkList.of(sr, rstream(h.getAnnotations()));
+ var x = RdfParser.create().apply(al).build().getSession();
+ assertEquals("RDF/XML-ABBREV", x.getLanguage());
+ }
+
+ //-----------------------------------------------------------------------------------------------------------------
+ // No annotation (defaults)
+ //-----------------------------------------------------------------------------------------------------------------
+
+ static class I {}
+ static ClassInfo i = ClassInfo.of(I.class);
+
+ @Test void a11_noAnnotation_serializer() {
+ var al = AnnotationWorkList.of(sr, rstream(i.getAnnotations()));
+ var x = RdfSerializer.create().apply(al).build().getSession();
+ assertEquals("RDF/XML-ABBREV", x.getLanguage());
+ assertFalse(x.isAddLiteralTypes());
+ assertFalse(x.isAddRootProp());
+ assertFalse(x.isLooseCollections());
+ }
+
+ @Test void a12_noAnnotation_parser() {
+ var al = AnnotationWorkList.of(sr, rstream(i.getAnnotations()));
+ var x = RdfParser.create().apply(al).build().getSession();
+ assertEquals("RDF/XML-ABBREV", x.getLanguage());
+ }
+
+ //-----------------------------------------------------------------------------------------------------------------
+ // disableAutoDetectNamespaces
+ //-----------------------------------------------------------------------------------------------------------------
+
+ @RdfConfig(disableAutoDetectNamespaces = "true")
+ static class J {}
+ static ClassInfo j = ClassInfo.of(J.class);
+
+ @Test void a13_disableAutoDetectNamespaces() {
+ var al = AnnotationWorkList.of(sr, rstream(j.getAnnotations()));
+ var x = RdfSerializer.create().apply(al).build().getSession();
+ assertFalse(x.isAutoDetectNamespaces());
+ }
+
+ //-----------------------------------------------------------------------------------------------------------------
+ // addBeanTypes
+ //-----------------------------------------------------------------------------------------------------------------
+
+ @RdfConfig(addBeanTypes = "true")
+ static class K {}
+ static ClassInfo k = ClassInfo.of(K.class);
+
+ @Test void a14_addBeanTypes() {
+ var al = AnnotationWorkList.of(sr, rstream(k.getAnnotations()));
+ // Verify build doesn't throw; addBeanTypesRdf is set
+ assertDoesNotThrow(() -> RdfSerializer.create().apply(al).build());
+ }
+
+ //-----------------------------------------------------------------------------------------------------------------
+ // juneauNs, juneauBpNs, disableUseXmlNamespaces for serializer
+ //-----------------------------------------------------------------------------------------------------------------
+
+ @RdfConfig(juneauNs = "myj:http://myjuneau/", juneauBpNs = "mybp:http://mybp/", disableUseXmlNamespaces = "true")
+ static class L {}
+ static ClassInfo l = ClassInfo.of(L.class);
+
+ @Test void a15_juneauNs_juneauBpNs_disableUseXmlNamespaces_serializer() {
+ var al = AnnotationWorkList.of(sr, rstream(l.getAnnotations()));
+ var x = RdfSerializer.create().apply(al).build().getSession();
+ assertEquals("myj", x.getJuneauNs().getName());
+ assertEquals("mybp", x.getJuneauBpNs().getName());
+ assertFalse(x.isUseXmlNamespaces());
+ }
+
+ //-----------------------------------------------------------------------------------------------------------------
+ // juneauNs, juneauBpNs, trimWhitespace for parser
+ //-----------------------------------------------------------------------------------------------------------------
+
+ @RdfConfig(juneauNs = "myj:http://myjuneau/", juneauBpNs = "mybp:http://mybp/", trimWhitespace = "true")
+ static class M {}
+ static ClassInfo m = ClassInfo.of(M.class);
+
+ @Test void a16_juneauNs_juneauBpNs_trimWhitespace_parser() {
+ var al = AnnotationWorkList.of(sr, rstream(m.getAnnotations()));
+ var x = RdfParser.create().apply(al).build().getSession();
+ assertEquals("myj", x.getJuneauNs().getName());
+ assertEquals("mybp", x.getJuneauBpNs().getName());
+ assertTrue(x.isTrimWhitespace());
+ }
+
+ //-----------------------------------------------------------------------------------------------------------------
+ // namespaces for serializer
+ //-----------------------------------------------------------------------------------------------------------------
+
+ @RdfConfig(namespaces = "ex:http://example.org/")
+ static class N {}
+ static ClassInfo n2 = ClassInfo.of(N.class);
+
+ @Test void a17_namespaces_serializer() {
+ var al = AnnotationWorkList.of(sr, rstream(n2.getAnnotations()));
+ var x = RdfSerializer.create().apply(al).build().getSession();
+ assertTrue(x.getNamespaces().length > 0);
+ }
+
+ //-----------------------------------------------------------------------------------------------------------------
+ // rdfxml settings (serializer)
+ //-----------------------------------------------------------------------------------------------------------------
+
+ @RdfConfig(
+ rdfxml_iriRules = "strict",
+ rdfxml_errorMode = "STRICT",
+ rdfxml_embedding = "true",
+ rdfxml_longId = "true",
+ rdfxml_allowBadUris = "true",
+ rdfxml_relativeUris = "same-document",
+ rdfxml_showXmlDeclaration = "true",
+ rdfxml_disableShowDoctypeDeclaration = "true",
+ rdfxml_tab = "4",
+ rdfxml_attributeQuoteChar = "'",
+ rdfxml_blockRules = "idAttr"
+ )
+ static class O {}
+ static ClassInfo o = ClassInfo.of(O.class);
+
+ @Test void a18_rdfxmlSettings_serializer() {
+ var al = AnnotationWorkList.of(sr, rstream(o.getAnnotations()));
+ assertDoesNotThrow(() -> RdfSerializer.create().apply(al).build());
+ }
+
+ //-----------------------------------------------------------------------------------------------------------------
+ // rdfxml settings (parser)
+ //-----------------------------------------------------------------------------------------------------------------
+
+ @RdfConfig(
+ rdfxml_iriRules = "strict",
+ rdfxml_errorMode = "STRICT",
+ rdfxml_embedding = "true",
+ rdfxml_longId = "true",
+ rdfxml_allowBadUris = "true",
+ rdfxml_relativeUris = "same-document",
+ rdfxml_showXmlDeclaration = "true",
+ rdfxml_disableShowDoctypeDeclaration = "true",
+ rdfxml_tab = "4",
+ rdfxml_attributeQuoteChar = "'",
+ rdfxml_blockRules = "idAttr"
+ )
+ static class P {}
+ static ClassInfo p = ClassInfo.of(P.class);
+
+ @Test void a19_rdfxmlSettings_parser() {
+ var al = AnnotationWorkList.of(sr, rstream(p.getAnnotations()));
+ assertDoesNotThrow(() -> RdfParser.create().apply(al).build());
+ }
+
+ //-----------------------------------------------------------------------------------------------------------------
+ // n3 settings (serializer)
+ //-----------------------------------------------------------------------------------------------------------------
+
+ @RdfConfig(
+ n3_minGap = "2",
+ n3_disableObjectLists = "true",
+ n3_subjectColumn = "10",
+ n3_propertyColumn = "10",
+ n3_indentProperty = "5",
+ n3_widePropertyLen = "20",
+ n3_disableAbbrevBaseUri = "true",
+ n3_disableUsePropertySymbols = "true",
+ n3_disableUseTripleQuotedStrings = "true",
+ n3_disableUseDoubles = "true"
+ )
+ static class Q {}
+ static ClassInfo q = ClassInfo.of(Q.class);
+
+ @Test void a20_n3Settings_serializer() {
+ var al = AnnotationWorkList.of(sr, rstream(q.getAnnotations()));
+ assertDoesNotThrow(() -> RdfSerializer.create().apply(al).build());
+ }
+
+ //-----------------------------------------------------------------------------------------------------------------
+ // n3 settings (parser)
+ //-----------------------------------------------------------------------------------------------------------------
+
+ @RdfConfig(
+ n3_minGap = "2",
+ n3_disableObjectLists = "true",
+ n3_subjectColumn = "10",
+ n3_propertyColumn = "10",
+ n3_indentProperty = "5",
+ n3_widePropertyLen = "20",
+ n3_disableAbbrevBaseUri = "true",
+ n3_disableUsePropertySymbols = "true",
+ n3_disableUseTripleQuotedStrings = "true",
+ n3_disableUseDoubles = "true"
+ )
+ static class R {}
+ static ClassInfo r = ClassInfo.of(R.class);
+
+ @Test void a21_n3Settings_parser() {
+ var al = AnnotationWorkList.of(sr, rstream(r.getAnnotations()));
+ assertDoesNotThrow(() -> RdfParser.create().apply(al).build());
+ }
+}
diff --git a/juneau-core/juneau-marshall-rdf/src/test/java/org/apache/juneau/marshall/jena/RdfParser_Test.java b/juneau-core/juneau-marshall-rdf/src/test/java/org/apache/juneau/marshall/jena/RdfParser_Test.java
new file mode 100644
index 0000000000..6f07b80765
--- /dev/null
+++ b/juneau-core/juneau-marshall-rdf/src/test/java/org/apache/juneau/marshall/jena/RdfParser_Test.java
@@ -0,0 +1,457 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.juneau.marshall.jena;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+import java.util.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.commons.bean.*;
+import org.apache.juneau.commons.reflect.*;
+import org.apache.juneau.marshall.*;
+import org.apache.juneau.marshall.parser.*;
+import org.apache.juneau.marshall.xml.*;
+import org.junit.jupiter.api.*;
+
+@SuppressWarnings({
+ "java:S5778", // assertThrows lambdas with chained calls; intermediate invocations do not throw in practice.
+ "java:S5976" // Explicit per-case parser tests are clearer for diagnostics than a single parameterized rewrite.
+})
+class RdfParser_Test extends TestBase {
+
+ public static class NamedBean {
+ private String name;
+ public String getName() { return name; }
+ public void setName(String name) { this.name = name; }
+ }
+
+ @Nested class A_builderSettings extends TestBase {
+
+ @Test void a01_language_ntriple() {
+ var x = RdfParser.create().language("N-TRIPLE").build();
+ assertEquals("N-TRIPLE", x.getLanguage());
+ }
+
+ @Test void a02_language_turtle() {
+ var x = RdfParser.create().language("TURTLE").build();
+ assertEquals("TURTLE", x.getLanguage());
+ }
+
+ @Test void a03_language_rdfxml() {
+ var x = RdfParser.create().xml().build();
+ assertEquals("RDF/XML", x.getLanguage());
+ }
+
+ @Test void a04_language_xmlabbrev() {
+ var x = RdfParser.create().xmlabbrev().build();
+ assertEquals("RDF/XML-ABBREV", x.getLanguage());
+ }
+
+ @Test void a05_language_n3() {
+ var x = RdfParser.create().n3().build();
+ assertEquals("N3", x.getLanguage());
+ }
+
+ @Test void a06_language_nquads() {
+ var x = RdfParser.create().nQuads().build();
+ assertEquals("N-QUADS", x.getLanguage());
+ }
+
+ @Test void a07_language_trig() {
+ var x = RdfParser.create().triG().build();
+ assertEquals("TRIG", x.getLanguage());
+ }
+
+ @Test void a08_language_trix() {
+ var x = RdfParser.create().triX().build();
+ assertEquals("TRIX", x.getLanguage());
+ }
+
+ @Test void a09_language_turtle_shortcut() {
+ var x = RdfParser.create().turtle().build();
+ assertEquals("TURTLE", x.getLanguage());
+ }
+
+ @Test void a10_language_jsonld() {
+ var x = RdfParser.create().jsonLd().build();
+ assertEquals("JSON-LD", x.getLanguage());
+ }
+
+ @Test void a11_language_rdfjson() {
+ var x = RdfParser.create().rdfJson().build();
+ assertEquals("RDF/JSON", x.getLanguage());
+ }
+
+ @Test void a12_collectionFormat_bag() {
+ var x = RdfParser.create().collectionFormat(RdfCollectionFormat.BAG).build();
+ assertEquals(RdfCollectionFormat.BAG, x.getCollectionFormat());
+ }
+
+ @Test void a13_collectionFormat_seq() {
+ var x = RdfParser.create().collectionFormat(RdfCollectionFormat.SEQ).build();
+ assertEquals(RdfCollectionFormat.SEQ, x.getCollectionFormat());
+ }
+
+ @Test void a14_looseCollections() {
+ var x1 = RdfParser.create().looseCollections().build();
+ assertTrue(x1.isLooseCollections());
+ var x2 = RdfParser.create().looseCollections(false).build();
+ assertFalse(x2.isLooseCollections());
+ }
+
+ @Test void a15_trimWhitespace() {
+ var x1 = RdfParser.create().trimWhitespace().build();
+ assertTrue(x1.isTrimWhitespace());
+ var x2 = RdfParser.create().trimWhitespace(false).build();
+ assertFalse(x2.isTrimWhitespace());
+ }
+
+ @Test void a16_juneauNs() {
+ var ns = Namespace.of("myj", "http://myjuneau/");
+ var x = RdfParser.create().juneauNs(ns).build();
+ assertEquals(ns, x.getJuneauNs());
+ }
+
+ @Test void a17_juneauBpNs() {
+ var ns = Namespace.of("mybp", "http://mybp/");
+ var x = RdfParser.create().juneauBpNs(ns).build();
+ assertEquals(ns, x.getJuneauBpNs());
+ }
+
+ @Test void a18_jenaSettings() {
+ var x = RdfParser.create().jena("jena.prop", "value").build();
+ assertEquals("value", x.getJenaSettings().get("jena.prop"));
+ }
+
+ @Test void a19_unbuffered() {
+ var x1 = RdfParser.create().unbuffered().build();
+ assertNotNull(x1);
+ var x2 = RdfParser.create().unbuffered(false).build();
+ assertNotNull(x2);
+ }
+
+ @Test void a20_enumFormatName() {
+ var x = RdfParser.create().enumFormat(EnumFormat.NAME).build();
+ assertNotNull(x);
+ }
+
+ @Test void a21_useJavaBeanIntrospector() {
+ var x = RdfParser.create().useJavaBeanIntrospector().build();
+ assertNotNull(x);
+ }
+
+ @Test void a22_timeZone() {
+ var tz = TimeZone.getTimeZone("America/New_York");
+ var x = RdfParser.create().timeZone(tz).build();
+ assertNotNull(x);
+ }
+
+ @Test void a23_typeName() {
+ var x = RdfParser.create().typeName(String.class, "myString").build();
+ assertNotNull(x);
+ }
+
+ @Test void a24_typePropertyName_onClass() {
+ var x = RdfParser.create().typePropertyName(String.class, "_mytype").build();
+ assertNotNull(x);
+ }
+
+ @Test void a25_swap_twoFunction() {
+ // The 3-param swap always throws since unswapFunction is required
+ assertThrows(IllegalArgumentException.class, () ->
+ RdfParser.create().swap(Integer.class, String.class, String::valueOf).build()
+ );
+ }
+
+ @Test void a26_swap_fourFunction() {
+ var x = RdfParser.create()
+ .swap(Integer.class, String.class, String::valueOf, Integer::parseInt)
+ .build();
+ assertNotNull(x);
+ }
+
+ @Test void a27_copy() {
+ var b = RdfParser.create().language("TURTLE").looseCollections();
+ var copy = b.copy();
+ var x = copy.build();
+ assertEquals("TURTLE", x.getLanguage());
+ assertTrue(x.isLooseCollections());
+ }
+
+ @Test void a28_copy_fromParser() {
+ var p = RdfParser.create().language("N-TRIPLE").trimWhitespace().build();
+ var copy = p.copy();
+ var x = copy.build();
+ assertEquals("N-TRIPLE", x.getLanguage());
+ assertTrue(x.isTrimWhitespace());
+ }
+ }
+
+ @Nested class B_properties extends TestBase {
+
+ @Test void b01_toString_includes_language() {
+ var x = RdfParser.create().language("TURTLE").build();
+ var str = x.toString();
+ assertNotNull(str);
+ assertTrue(str.contains("TURTLE"));
+ }
+
+ @Test void b02_getJenaSettings_empty_by_default() {
+ var x = RdfParser.create().build();
+ assertNotNull(x.getJenaSettings());
+ }
+
+ @Test void b03_getCollectionFormat_default() {
+ var x = RdfParser.create().build();
+ assertEquals(RdfCollectionFormat.DEFAULT, x.getCollectionFormat());
+ }
+
+ @Test void b04_isLooseCollections_default() {
+ var x = RdfParser.create().build();
+ assertFalse(x.isLooseCollections());
+ }
+
+ @Test void b05_isTrimWhitespace_default() {
+ var x = RdfParser.create().build();
+ assertFalse(x.isTrimWhitespace());
+ }
+ }
+
+ @Nested class C_parsing extends TestBase {
+
+ @Test void c01_parse_string_ntriple() throws Exception {
+ var serialized = RdfSerializer.create().language("N-TRIPLE").build().serialize("foo");
+ var p = RdfParser.create().language("N-TRIPLE").build();
+ var result = p.parse(serialized, String.class);
+ assertEquals("foo", result);
+ }
+
+ @Test void c02_parse_string_turtle() throws Exception {
+ var serialized = RdfSerializer.create().language("TURTLE").build().serialize("foo");
+ var p = RdfParser.create().language("TURTLE").build();
+ var result = p.parse(serialized, String.class);
+ assertEquals("foo", result);
+ }
+
+ @Test void c03_parse_string_rdfxml() throws Exception {
+ var serialized = RdfSerializer.create().language("RDF/XML").build().serialize("foo");
+ var p = RdfParser.create().language("RDF/XML").build();
+ var result = p.parse(serialized, String.class);
+ assertEquals("foo", result);
+ }
+
+ @Test void c04_parse_string_n3() throws Exception {
+ var serialized = RdfSerializer.create().language("N3").build().serialize("foo");
+ var p = RdfParser.create().language("N3").build();
+ var result = p.parse(serialized, String.class);
+ assertEquals("foo", result);
+ }
+ }
+
+ @Nested class D_inheritedBuilderMethods extends TestBase {
+
+ @Marshalled(typeName = "D01_DictBean")
+ static class D01_DictBean {}
+
+ static class D10_TestParserListener extends ParserListener {}
+
+ @SuppressWarnings({
+ "unchecked", // Raw type needed for beanInterceptor test
+ "rawtypes" // (Class) cast required by beanInterceptor API
+ })
+ @Test void d01_beanVisibilityAndContext() {
+ assertNotNull(RdfParser.create().beanClassVisibility(Visibility.PUBLIC).build());
+ assertNotNull(RdfParser.create().beanConstructorVisibility(Visibility.PUBLIC).build());
+ assertNotNull(RdfParser.create().beanFieldVisibility(Visibility.PUBLIC).build());
+ assertNotNull(RdfParser.create().beanMethodVisibility(Visibility.PUBLIC).build());
+ assertNotNull(RdfParser.create().marshallingContext(MarshallingContext.DEFAULT).build());
+ assertNotNull(RdfParser.create().marshallingContext(MarshallingContext.create()).build());
+ assertNotNull(RdfParser.create().beanDictionary(D01_DictBean.class).build());
+ assertNotNull(RdfParser.create().beanInterceptor(String.class, (Class)BeanInterceptor.class).build());
+ assertNotNull(RdfParser.create().beanMapPutReturnsOldValue().build());
+ }
+
+ @Test void d02_beanProperties() {
+ assertNotNull(RdfParser.create().beanProperties(String.class, "foo").build());
+ assertNotNull(RdfParser.create().beanProperties(Map.of("String", "foo")).build());
+ assertNotNull(RdfParser.create().beanProperties("java.lang.String", "foo").build());
+ assertNotNull(RdfParser.create().beanPropertiesExcludes(String.class, "foo").build());
+ assertNotNull(RdfParser.create().beanPropertiesExcludes(Map.of("String", "foo")).build());
+ assertNotNull(RdfParser.create().beanPropertiesExcludes("java.lang.String", "foo").build());
+ assertNotNull(RdfParser.create().beanPropertiesReadOnly(String.class, "foo").build());
+ assertNotNull(RdfParser.create().beanPropertiesReadOnly(Map.of("String", "foo")).build());
+ assertNotNull(RdfParser.create().beanPropertiesReadOnly("java.lang.String", "foo").build());
+ assertNotNull(RdfParser.create().beanPropertiesWriteOnly(String.class, "foo").build());
+ assertNotNull(RdfParser.create().beanPropertiesWriteOnly(Map.of("String", "foo")).build());
+ assertNotNull(RdfParser.create().beanPropertiesWriteOnly("java.lang.String", "foo").build());
+ }
+
+ @Test void d03_beansRequire() {
+ assertNotNull(RdfParser.create().beansRequireDefaultConstructor().build());
+ assertNotNull(RdfParser.create().beansRequireSerializable().build());
+ assertNotNull(RdfParser.create().beansRequireSettersForGetters().build());
+ }
+
+ @Test void d04_autoCloseAndConsumes() {
+ assertNotNull(RdfParser.create().autoCloseStreams().build());
+ assertNotNull(RdfParser.create().autoCloseStreams(false).build());
+ assertNotNull(RdfParser.create().consumes("text/xml+rdf").build());
+ }
+
+ @Test void d05_debug() {
+ assertNotNull(RdfParser.create().debug().build());
+ assertNotNull(RdfParser.create().debug(false).build());
+ assertNotNull(RdfParser.create().debugOutputLines(5).build());
+ }
+
+ @Test void d06_dictionaryAndDisable() {
+ assertNotNull(RdfParser.create().dictionaryOn(String.class, String.class).build());
+ assertNotNull(RdfParser.create().disableBeansRequireSomeProperties().build());
+ assertNotNull(RdfParser.create().disableIgnoreMissingSetters().build());
+ assertNotNull(RdfParser.create().disableIgnoreTransientFields().build());
+ assertNotNull(RdfParser.create().disableIgnoreUnknownNullBeanProperties().build());
+ assertNotNull(RdfParser.create().disableInterfaceProxies().build());
+ }
+
+ @Test void d07_exampleAndCharsets() {
+ assertNotNull(RdfParser.create().example(Integer.class, "42").build());
+ assertNotNull(RdfParser.create().example(Integer.class, 42).build());
+ assertNotNull(RdfParser.create().fileCharset(java.nio.charset.StandardCharsets.UTF_8).build());
+ assertNotNull(RdfParser.create().streamCharset(java.nio.charset.StandardCharsets.UTF_8).build());
+ }
+
+ @Test void d08_findFluentSetters() {
+ assertNotNull(RdfParser.create().findFluentSetters().build());
+ assertNotNull(RdfParser.create().findFluentSetters(String.class).build());
+ }
+
+ @Test void d09_ignoreAndImpl() {
+ assertNotNull(RdfParser.create().ignoreInvocationExceptionsOnGetters().build());
+ assertNotNull(RdfParser.create().ignoreInvocationExceptionsOnSetters().build());
+ assertNotNull(RdfParser.create().ignoreUnknownBeanProperties().build());
+ assertNotNull(RdfParser.create().ignoreUnknownEnumValues().build());
+ assertNotNull(RdfParser.create().impl(RdfParser.create().build()).build());
+ assertNotNull(RdfParser.create().implClass(List.class, ArrayList.class).build());
+ var implMap = new HashMap<Class<?>,Class<?>>();
+ implMap.put(List.class, ArrayList.class);
+ assertNotNull(RdfParser.create().implClasses(implMap).build());
+ assertNotNull(RdfParser.create().interfaceClass(List.class, List.class).build());
+ assertNotNull(RdfParser.create().interfaces(List.class).build());
+ }
+
+ @Test void d10_listenerLocaleMediaType() {
+ assertNotNull(RdfParser.create().listener(D10_TestParserListener.class).build());
+ assertNotNull(RdfParser.create().locale(Locale.ENGLISH).build());
+ assertNotNull(RdfParser.create().mediaType(org.apache.juneau.commons.http.MediaType.of("text/xml+rdf")).build());
+ }
+
+ @Test void d11_notBeanAndPropertyNamer() {
+ assertNotNull(RdfParser.create().notBeanClasses(String.class).build());
+ assertNotNull(RdfParser.create().notBeanPackages("java.lang").build());
+ assertNotNull(RdfParser.create().propertyNamer(String.class, PropertyNamerDLC.class).build());
+ assertNotNull(RdfParser.create().propertyNamer(PropertyNamerDLC.class).build());
+ }
+
+ @Test void d12_languageShortcutAndN3() {
+ assertNotNull(RdfParser.create().ntriple().build());
+ assertNotNull(RdfParser.create().n3_disableAbbrevBaseUri().build());
+ assertNotNull(RdfParser.create().n3_disableAbbrevBaseUri(false).build());
+ assertNotNull(RdfParser.create().n3_disableObjectLists().build());
+ assertNotNull(RdfParser.create().n3_disableObjectLists(false).build());
+ assertNotNull(RdfParser.create().n3_disableUseDoubles().build());
+ assertNotNull(RdfParser.create().n3_disableUseDoubles(false).build());
+ assertNotNull(RdfParser.create().n3_disableUsePropertySymbols().build());
+ assertNotNull(RdfParser.create().n3_disableUsePropertySymbols(false).build());
+ assertNotNull(RdfParser.create().n3_disableUseTripleQuotedStrings().build());
+ assertNotNull(RdfParser.create().n3_disableUseTripleQuotedStrings(false).build());
+ assertNotNull(RdfParser.create().n3_indentProperty(4).build());
+ assertNotNull(RdfParser.create().n3_minGap(1).build());
+ assertNotNull(RdfParser.create().n3_propertyColumn(8).build());
+ assertNotNull(RdfParser.create().n3_subjectColumn(8).build());
+ assertNotNull(RdfParser.create().n3_widePropertyLen(20).build());
+ }
+
+ @Test void d13_rdfXmlSettings() {
+ assertNotNull(RdfParser.create().rdfxml_allowBadUris().build());
+ assertNotNull(RdfParser.create().rdfxml_allowBadUris(false).build());
+ assertNotNull(RdfParser.create().rdfxml_attributeQuoteChar('"').build());
+ assertNotNull(RdfParser.create().rdfxml_blockRules("").build());
+ assertNotNull(RdfParser.create().rdfxml_disableShowDoctypeDeclaration().build());
+ assertNotNull(RdfParser.create().rdfxml_disableShowDoctypeDeclaration(false).build());
+ assertNotNull(RdfParser.create().rdfxml_embedding().build());
+ assertNotNull(RdfParser.create().rdfxml_embedding(false).build());
+ assertNotNull(RdfParser.create().rdfxml_errorMode("default").build());
+ assertNotNull(RdfParser.create().rdfxml_iriRules("lax").build());
+ assertNotNull(RdfParser.create().rdfxml_longId().build());
+ assertNotNull(RdfParser.create().rdfxml_longId(false).build());
+ assertNotNull(RdfParser.create().rdfxml_relativeUris("").build());
+ assertNotNull(RdfParser.create().rdfxml_showXmlDeclaration("false").build());
+ assertNotNull(RdfParser.create().rdfxml_tab(4).build());
+ assertNotNull(RdfParser.create().rdfxml_xmlbase("http://example.org/").build());
+ }
+
+ @Test void d14_sortStopAndOther() {
+ assertNotNull(RdfParser.create().build());
+ assertNotNull(RdfParser.create().build());
+ assertNotNull(RdfParser.create().stopClass(String.class, Object.class).build());
+ assertNotNull(RdfParser.create().swaps(new Class<?>[0]).build());
+ assertNotNull(RdfParser.create().swaps(new Object[0]).build());
+ assertNotNull(RdfParser.create().trimStrings().build());
+ assertNotNull(RdfParser.create().trimStrings(false).build());
+ assertNotNull(RdfParser.create().type(RdfParser.class).build());
+ assertNotNull(RdfParser.create().typePropertyName("_type").build());
+ }
+
+ @Test void d15_n3SubLanguages_consumes() {
+ // Cover the switch cases for N3-PP, N3-PLAIN, N3-TRIPLES in getConsumes()
+ assertNotNull(RdfParser.create().language("N3-PP").build());
+ assertNotNull(RdfParser.create().language("N3-PLAIN").build());
+ assertNotNull(RdfParser.create().language("N3-TRIPLES").build());
+ }
+
+ @Test void d16_sessionBuilderMethods() {
+ // Cover RdfParserSession.Builder fluent methods
+ var p = RdfParser.create().build();
+ var sb = p.createSession();
+ assertNotNull(sb.apply(String.class, x -> {}).build());
+ assertNotNull(p.createSession().debug(false).build());
+ assertNotNull(p.createSession().javaMethod(null).build());
+ assertNotNull(p.createSession().locale(Locale.US).build());
+ assertNotNull(p.createSession().fileCharset(java.nio.charset.Charset.defaultCharset()).build());
+ assertNotNull(p.createSession().mediaType(org.apache.juneau.commons.http.MediaType.JSON).build());
+ }
+
+ @Test void d17_xmlMetaProviderMethods() {
+ // Cover getXmlBeanMeta and getXmlBeanPropertyMeta methods in RdfParser
+ var p = RdfParser.create().build();
+ var bc = p.getMarshallingContext();
+ var bm = bc.getBeanMeta(NamedBean.class);
+ assertNotNull(bm);
+ assertNotNull(p.getXmlBeanMeta(bm));
+ var bpm = bm.getPropertyMeta("name");
+ assertNotNull(bpm);
+ assertNotNull(p.getXmlBeanPropertyMeta(bpm));
+ assertNotNull(p.getXmlClassMeta(bc.getClassMeta(String.class)));
+ }
+
+ @Test void d18_swapBuilderMethod() {
+ // Cover swap(normalClass, swappedClass, swapFunction) with 3 args
+ assertNotNull(RdfParser.create().swap(String.class, Integer.class, Integer::parseInt, Object::toString).build());
+ }
+ }
+}
diff --git a/juneau-core/juneau-marshall-rdf/src/test/java/org/apache/juneau/marshall/jena/RdfSerializer_Test.java b/juneau-core/juneau-marshall-rdf/src/test/java/org/apache/juneau/marshall/jena/RdfSerializer_Test.java
new file mode 100644
index 0000000000..cc1ecc1afe
--- /dev/null
+++ b/juneau-core/juneau-marshall-rdf/src/test/java/org/apache/juneau/marshall/jena/RdfSerializer_Test.java
@@ -0,0 +1,615 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.juneau.marshall.jena;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+import java.util.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.commons.bean.*;
+import org.apache.juneau.commons.reflect.*;
+import org.apache.juneau.marshall.*;
+import org.apache.juneau.marshall.serializer.*;
+import org.apache.juneau.marshall.xml.*;
+import org.junit.jupiter.api.*;
+
+@SuppressWarnings({
+ "java:S5976" // Explicit per-case builder/serializer tests are clearer here than a single parameterized rewrite.
+})
+class RdfSerializer_Test extends TestBase {
+
+ public static class NamedBean {
+ private String name;
+ public String getName() { return name; }
+ public void setName(String name) { this.name = name; }
+ }
+
+ @Nested class A_builderSettings extends TestBase {
+
+ @Test void a01_addBeanTypesRdf() {
+ // Verify addBeanTypesRdf builder methods don't throw and produce a valid serializer
+ var s1 = RdfSerializer.create().addBeanTypesRdf().build();
+ assertNotNull(s1);
+ var s2 = RdfSerializer.create().addBeanTypesRdf(false).build();
+ assertNotNull(s2);
+ var s3 = RdfSerializer.create().addBeanTypesRdf(true).build();
+ assertNotNull(s3);
+ }
+
+ @Test void a02_addLiteralTypes() {
+ var x1 = RdfSerializer.create().addLiteralTypes().build().getSession();
+ assertTrue(x1.isAddLiteralTypes());
+ var x2 = RdfSerializer.create().addLiteralTypes(false).build().getSession();
+ assertFalse(x2.isAddLiteralTypes());
+ }
+
+ @Test void a03_addRootProperty() {
+ var x1 = RdfSerializer.create().addRootProperty().build().getSession();
+ assertTrue(x1.isAddRootProp());
+ var x2 = RdfSerializer.create().addRootProperty(false).build().getSession();
+ assertFalse(x2.isAddRootProp());
+ }
+
+ @Test void a04_disableAutoDetectNamespaces() {
+ var x1 = RdfSerializer.create().disableAutoDetectNamespaces().build().getSession();
+ assertFalse(x1.isAutoDetectNamespaces());
+ var x2 = RdfSerializer.create().disableAutoDetectNamespaces(false).build().getSession();
+ assertTrue(x2.isAutoDetectNamespaces());
+ }
+
+ @Test void a05_disableUseXmlNamespaces() {
+ var x1 = RdfSerializer.create().disableUseXmlNamespaces().build().getSession();
+ assertFalse(x1.isUseXmlNamespaces());
+ var x2 = RdfSerializer.create().disableUseXmlNamespaces(false).build().getSession();
+ assertTrue(x2.isUseXmlNamespaces());
+ }
+
+ @Test void a06_looseCollections() {
+ var x1 = RdfSerializer.create().looseCollections().build().getSession();
+ assertTrue(x1.isLooseCollections());
+ var x2 = RdfSerializer.create().looseCollections(false).build().getSession();
+ assertFalse(x2.isLooseCollections());
+ }
+
+ @Test void a07_language_ntriple() {
+ var x = RdfSerializer.create().language("N-TRIPLE").build().getSession();
+ assertEquals("N-TRIPLE", x.getLanguage());
+ }
+
+ @Test void a08_language_turtle() {
+ var x = RdfSerializer.create().language("TURTLE").build().getSession();
+ assertEquals("TURTLE", x.getLanguage());
+ }
+
+ @Test void a09_collectionFormat_bag() {
+ var x = RdfSerializer.create().collectionFormat(RdfCollectionFormat.BAG).build().getSession();
+ assertEquals(RdfCollectionFormat.BAG, x.getCollectionFormat());
+ }
+
+ @Test void a10_collectionFormat_seq() {
+ var x = RdfSerializer.create().collectionFormat(RdfCollectionFormat.SEQ).build().getSession();
+ assertEquals(RdfCollectionFormat.SEQ, x.getCollectionFormat());
+ }
+
+ @Test void a11_juneauNs() {
+ var ns = Namespace.of("myj", "http://myjuneau/");
+ var x = RdfSerializer.create().juneauNs(ns).build().getSession();
+ assertEquals(ns, x.getJuneauNs());
+ }
+
+ @Test void a12_juneauBpNs() {
+ var ns = Namespace.of("mybp", "http://mybp/");
+ var x = RdfSerializer.create().juneauBpNs(ns).build().getSession();
+ assertEquals(ns, x.getJuneauBpNs());
+ }
+
+ @Test void a13_namespaces() {
+ var ns = Namespace.of("ex", "http://example.org/");
+ var x = RdfSerializer.create().namespaces(ns).build().getSession();
+ assertTrue(x.getNamespaces().length > 0);
+ }
+
+ @Test void a14_copy_builder() {
+ var b = RdfSerializer.create().language("N-TRIPLE").addLiteralTypes();
+ var copy = b.copy();
+ assertEquals("N-TRIPLE", copy.build().getSession().getLanguage());
+ assertTrue(copy.build().getSession().isAddLiteralTypes());
+ }
+
+ @Test void a15_copy_serializer() {
+ var s = RdfSerializer.create().language("TURTLE").addRootProperty().build();
+ var copy = s.copy();
+ assertEquals("TURTLE", copy.build().getSession().getLanguage());
+ assertTrue(copy.build().getSession().isAddRootProp());
+ }
+ }
+
+ @Nested class B_builderOverrides extends TestBase {
+
+ @Test void b01_beanVisibility() {
+ assertNotNull(RdfSerializer.create().beanClassVisibility(Visibility.PUBLIC).build());
+ assertNotNull(RdfSerializer.create().beanConstructorVisibility(Visibility.PUBLIC).build());
+ assertNotNull(RdfSerializer.create().beanFieldVisibility(Visibility.PUBLIC).build());
+ assertNotNull(RdfSerializer.create().beanMethodVisibility(Visibility.PUBLIC).build());
+ }
+
+ @Test void b02_beanContext() {
+ assertNotNull(RdfSerializer.create().marshallingContext(MarshallingContext.create().build()).build());
+ assertNotNull(RdfSerializer.create().marshallingContext(MarshallingContext.create()).build());
+ }
+
+ @Marshalled(typeName="myDictBean")
+ static class B03_DictBean {}
+
+ @Test void b03_beanDictionary() {
+ assertNotNull(RdfSerializer.create().beanDictionary(B03_DictBean.class).build());
+ }
+
+ @SuppressWarnings({
+ "unchecked", // Raw type needed for test simplicity
+ "rawtypes" // (Class) cast required by beanInterceptor API
+ })
+ @Test void b04_beanInterceptor() {
+ assertNotNull(RdfSerializer.create().beanInterceptor(String.class, (Class)BeanInterceptor.class).build());
+ }
+
+ @Test void b05_beanMapPutReturnsOldValue() {
+ assertNotNull(RdfSerializer.create().beanMapPutReturnsOldValue().build());
+ }
+
+ @Test void b06_beanProperties() {
+ assertNotNull(RdfSerializer.create().beanProperties(String.class, "foo").build());
+ assertNotNull(RdfSerializer.create().beanProperties(Map.of("String", "foo")).build());
+ assertNotNull(RdfSerializer.create().beanProperties("java.lang.String", "foo").build());
+ }
+
+ @Test void b07_beanPropertiesExcludes() {
+ assertNotNull(RdfSerializer.create().beanPropertiesExcludes(String.class, "foo").build());
+ assertNotNull(RdfSerializer.create().beanPropertiesExcludes(Map.of("String", "foo")).build());
+ assertNotNull(RdfSerializer.create().beanPropertiesExcludes("java.lang.String", "foo").build());
+ }
+
+ @Test void b08_beanPropertiesReadOnly() {
+ assertNotNull(RdfSerializer.create().beanPropertiesReadOnly(String.class, "foo").build());
+ assertNotNull(RdfSerializer.create().beanPropertiesReadOnly(Map.of("String", "foo")).build());
+ assertNotNull(RdfSerializer.create().beanPropertiesReadOnly("java.lang.String", "foo").build());
+ }
+
+ @Test void b09_beanPropertiesWriteOnly() {
+ assertNotNull(RdfSerializer.create().beanPropertiesWriteOnly(String.class, "foo").build());
+ assertNotNull(RdfSerializer.create().beanPropertiesWriteOnly(Map.of("String", "foo")).build());
+ assertNotNull(RdfSerializer.create().beanPropertiesWriteOnly("java.lang.String", "foo").build());
+ }
+
+ @Test void b10_beansRequire() {
+ assertNotNull(RdfSerializer.create().beansRequireDefaultConstructor().build());
+ assertNotNull(RdfSerializer.create().beansRequireSerializable().build());
+ assertNotNull(RdfSerializer.create().beansRequireSettersForGetters().build());
+ }
+
+ @Test void b11_debug() {
+ assertNotNull(RdfSerializer.create().debug().build());
+ assertNotNull(RdfSerializer.create().debug(false).build());
+ }
+
+ @Test void b12_detectRecursions() {
+ assertNotNull(RdfSerializer.create().detectRecursions().build());
+ assertNotNull(RdfSerializer.create().detectRecursions(false).build());
+ }
+
+ @Test void b13_disableBeansRequireSomeProperties() {
+ assertNotNull(RdfSerializer.create().disableBeansRequireSomeProperties().build());
+ }
+
+ @Test void b14_disableIgnore() {
+ assertNotNull(RdfSerializer.create().disableIgnoreMissingSetters().build());
+ assertNotNull(RdfSerializer.create().disableIgnoreTransientFields().build());
+ assertNotNull(RdfSerializer.create().disableIgnoreUnknownNullBeanProperties().build());
+ assertNotNull(RdfSerializer.create().disableInterfaceProxies().build());
+ }
+ }
+
+ @Nested class C_serialization extends TestBase {
+
+ @Test void c01_serialize_string_ntriple() throws Exception {
+ var s = RdfSerializer.create().language("N-TRIPLE").build();
+ var result = s.serialize("foo");
+ assertNotNull(result);
+ assertFalse(result.isEmpty());
+ }
+
+ @Test void c02_serialize_string_turtle() throws Exception {
+ var s = RdfSerializer.create().language("TURTLE").build();
+ var result = s.serialize("foo");
+ assertNotNull(result);
+ assertFalse(result.isEmpty());
+ }
+
+ @Test void c03_serialize_string_rdfxml() throws Exception {
+ var s = RdfSerializer.create().language("RDF/XML").build();
+ var result = s.serialize("foo");
+ assertNotNull(result);
+ assertFalse(result.isEmpty());
+ }
+
+ @Test void c04_serialize_with_addLiteralTypes() throws Exception {
+ var s = RdfSerializer.create().language("N-TRIPLE").addLiteralTypes().build();
+ var result = s.serialize(42);
+ assertNotNull(result);
+ assertFalse(result.isEmpty());
+ }
+
+ @Test void c05_serialize_with_addRootProperty() throws Exception {
+ var s = RdfSerializer.create().language("TURTLE").addRootProperty().build();
+ var result = s.serialize("foo");
+ assertNotNull(result);
+ assertFalse(result.isEmpty());
+ }
+ }
+
+ @Nested class E_beanMeta extends TestBase {
+
+ // Parent class annotated with @Rdf - ap.find() uses PARENTS traversal and finds this
+ // This exercises RdfBeanPropertyMeta.forEach (lines 67-71): both collectionFormat and beanUri branches
+ @Rdf(collectionFormat = RdfCollectionFormat.SEQ)
+ public static class E01_RdfParent {
+ private List<String> items = new ArrayList<>(List.of("a", "b"));
+ public List<String> getItems() { return items; }
+ public void setItems(List<String> v) { items = v; }
+ }
+
+ @Rdf(beanUri = true)
+ public static class E01_RdfParentWithBeanUri extends E01_RdfParent {
+ private String uri = "http://example.org/x";
+ public String getUri() { return uri; }
+ public void setUri(String v) { uri = v; }
+ }
+
+ public static class E01_ChildBean extends E01_RdfParentWithBeanUri {}
+
+ @Test void e01_beanPropertyMeta_parent_rdf() throws Exception {
+ // E01_ChildBean inherits @Rdf from both parents
+ // ap.find(Rdf.class, ChildBean.classMeta) traverses PARENTS → finds both @Rdf annotations
+ // This should populate rdfs and execute forEach body at lines 67-71
+ var s = (RdfSerializer) RdfSerializer.create().language("N-TRIPLE").build();
+ var bc = s.getMarshallingContext();
+ var cm = bc.getClassMeta(E01_ChildBean.class);
+ var bm = cm.getBeanMeta();
+ assertNotNull(bm);
+ // Directly create RdfBeanPropertyMeta to verify annotation discovery
+ var itemsBpm = bm.getPropertyMeta("items");
+ assertNotNull(itemsBpm);
+ var rdfBpm = new RdfBeanPropertyMeta(itemsBpm, s);
+ // @Rdf(collectionFormat=SEQ) is on E01_RdfParent which is a parent of E01_ChildBean
+ // The PARENTS traversal should find it
+ assertNotNull(rdfBpm.getCollectionFormat()); // SEQ or DEFAULT
+ // Also serialize to trigger the coverage paths
+ var result = s.serialize(new E01_ChildBean());
+ assertNotNull(result);
+ }
+
+ // Class-level @Rdf on parent - exercises RdfClassMeta lines 51, 54, 82
+ @Rdf(collectionFormat = RdfCollectionFormat.SEQ, prefix = "ex", namespace = "http://example.org/")
+ public static class E02_RdfAnnotatedParent {}
+
+ public static class E02_BeanWithRdfParent extends E02_RdfAnnotatedParent {
+ private String name = "test";
+ public String getName() { return name; }
+ public void setName(String v) { name = v; }
+ }
+
+ // @Rdf with no collectionFormat (DEFAULT) - exercises the false branch in filter (line 54)
+ @Rdf(prefix = "ex2", namespace = "http://example2.org/")
+ public static class E03_RdfAnnotatedParentNoCollectionFormat {}
+
+ public static class E03_BeanWithNoCollectionFormat extends E03_RdfAnnotatedParentNoCollectionFormat {
+ private String name = "test";
+ public String getName() { return name; }
+ public void setName(String v) { name = v; }
+ }
+
+ @Test void e02_classMeta_rdf_parent() throws Exception {
+ // E02_BeanWithRdfParent's ClassMeta has E02_RdfAnnotatedParent as parent with @Rdf(collectionFormat=SEQ)
+ // cm.forEachAnnotation(Rdf.class) with PARENTS+PACKAGE traversal finds @Rdf on the parent
+ // SEQ != DEFAULT so the filter at line 54 passes and collectionFormat = SEQ (true branch)
+ var s = (RdfSerializer) RdfSerializer.create().language("N-TRIPLE").build();
+ var bc = s.getMarshallingContext();
+ var cm = bc.getClassMeta(E02_BeanWithRdfParent.class);
+ var rdfCm = s.getRdfClassMeta(cm);
+ assertNotNull(rdfCm);
+ assertNotNull(rdfCm.getNamespace()); // exercises getNamespace() at line 82
+ assertEquals(RdfCollectionFormat.SEQ, rdfCm.getCollectionFormat());
+ var result = s.serialize(new E02_BeanWithRdfParent());
+ assertNotNull(result);
+ }
+
+ @Test void e03_classMeta_no_collection_format() throws Exception {
+ // E03_BeanWithNoCollectionFormat has a parent with @Rdf but no collectionFormat
+ // The filter at line 54 returns false for DEFAULT, so orElse(DEFAULT) is used (false branch)
+ var s = (RdfSerializer) RdfSerializer.create().language("N-TRIPLE").build();
+ var bc = s.getMarshallingContext();
+ var cm = bc.getClassMeta(E03_BeanWithNoCollectionFormat.class);
+ var rdfCm = s.getRdfClassMeta(cm);
+ assertNotNull(rdfCm);
+ assertEquals(RdfCollectionFormat.DEFAULT, rdfCm.getCollectionFormat());
+ var result = s.serialize(new E03_BeanWithNoCollectionFormat());
+ assertNotNull(result);
+ }
+ }
+
+ @Test void d01_constants_class() {
+ // Verify constants are accessible at runtime (not all are compile-time inlined)
+ assertNotNull(Constants.RDF_NIL);
+ assertNotNull(Constants.RDF_SEQ);
+ assertNotNull(Constants.RDF_BAG);
+ assertNotNull(Constants.RDF_juneauNs_ITEMS);
+ }
+
+ @Nested class F_inheritedBuilderMethods extends TestBase {
+
+ static class F01_TestSerializerListener extends SerializerListener {}
+
+ @Test void f01_copyConstrutor() {
+ var ns = Namespace.of("ex", "http://example.org/");
+ var s = RdfSerializer.create().language("N-TRIPLE").namespaces(ns).build();
+ var copy = s.copy().build();
+ assertNotNull(copy);
+ }
+
+ @Test void f02_exampleAndCharsets() {
+ assertNotNull(RdfSerializer.create().example(Integer.class, "42").build());
+ assertNotNull(RdfSerializer.create().example(Integer.class, 42).build());
+ assertNotNull(RdfSerializer.create().fileCharset(java.nio.charset.StandardCharsets.UTF_8).build());
+ assertNotNull(RdfSerializer.create().streamCharset(java.nio.charset.StandardCharsets.UTF_8).build());
+ }
+
+ @Test void f03_findFluentSetters() {
+ assertNotNull(RdfSerializer.create().findFluentSetters().build());
+ assertNotNull(RdfSerializer.create().findFluentSetters(String.class).build());
+ }
+
+ @Test void f04_ignoreAndImpl() {
+ assertNotNull(RdfSerializer.create().ignoreInvocationExceptionsOnGetters().build());
+ assertNotNull(RdfSerializer.create().ignoreInvocationExceptionsOnSetters().build());
+ assertNotNull(RdfSerializer.create().ignoreRecursions().build());
+ assertNotNull(RdfSerializer.create().ignoreRecursions(false).build());
+ assertNotNull(RdfSerializer.create().ignoreUnknownBeanProperties().build());
+ assertNotNull(RdfSerializer.create().ignoreUnknownEnumValues().build());
+ assertNotNull(RdfSerializer.create().impl(RdfSerializer.create().build()).build());
+ assertNotNull(RdfSerializer.create().implClass(List.class, ArrayList.class).build());
+ var implMap = new HashMap<Class<?>,Class<?>>();
+ implMap.put(List.class, ArrayList.class);
+ assertNotNull(RdfSerializer.create().implClasses(implMap).build());
+ assertNotNull(RdfSerializer.create().interfaceClass(List.class, List.class).build());
+ assertNotNull(RdfSerializer.create().interfaces(List.class).build());
+ }
+
+ @Test void f05_depthAndNesting() {
+ assertNotNull(RdfSerializer.create().initialDepth(0).build());
+ assertNotNull(RdfSerializer.create().maxDepth(10).build());
+ assertNotNull(RdfSerializer.create().maxIndent(10).build());
+ }
+
+ @Test void f06_keepNullAndListener() {
+ assertNotNull(RdfSerializer.create().keepNullProperties().build());
+ assertNotNull(RdfSerializer.create().keepNullProperties(false).build());
+ assertNotNull(RdfSerializer.create().listener(F01_TestSerializerListener.class).build());
+ assertNotNull(RdfSerializer.create().locale(Locale.ENGLISH).build());
+ assertNotNull(RdfSerializer.create().mediaType(org.apache.juneau.commons.http.MediaType.of("text/xml+rdf")).build());
+ }
+
+ @Test void f07_n3Settings() {
+ assertNotNull(RdfSerializer.create().n3().build());
+ assertNotNull(RdfSerializer.create().n3_disableAbbrevBaseUri().build());
+ assertNotNull(RdfSerializer.create().n3_disableAbbrevBaseUri(false).build());
+ assertNotNull(RdfSerializer.create().n3_disableObjectLists().build());
+ assertNotNull(RdfSerializer.create().n3_disableObjectLists(false).build());
+ assertNotNull(RdfSerializer.create().n3_disableUseDoubles().build());
+ assertNotNull(RdfSerializer.create().n3_disableUseDoubles(false).build());
+ assertNotNull(RdfSerializer.create().n3_disableUsePropertySymbols().build());
+ assertNotNull(RdfSerializer.create().n3_disableUsePropertySymbols(false).build());
+ assertNotNull(RdfSerializer.create().n3_disableUseTripleQuotedStrings().build());
+ assertNotNull(RdfSerializer.create().n3_disableUseTripleQuotedStrings(false).build());
+ assertNotNull(RdfSerializer.create().n3_indentProperty(4).build());
+ assertNotNull(RdfSerializer.create().n3_minGap(1).build());
+ assertNotNull(RdfSerializer.create().n3_propertyColumn(8).build());
+ assertNotNull(RdfSerializer.create().n3_subjectColumn(8).build());
+ assertNotNull(RdfSerializer.create().n3_widePropertyLen(20).build());
+ }
+
+ @Test void f08_notBeanAndPropertyNamer() {
+ assertNotNull(RdfSerializer.create().notBeanClasses(String.class).build());
+ assertNotNull(RdfSerializer.create().notBeanPackages("java.lang").build());
+ assertNotNull(RdfSerializer.create().ntriple().build());
+ assertNotNull(RdfSerializer.create().produces("text/xml+rdf").build());
+ assertNotNull(RdfSerializer.create().propertyNamer(String.class, PropertyNamerDLC.class).build());
+ assertNotNull(RdfSerializer.create().propertyNamer(PropertyNamerDLC.class).build());
+ assertNotNull(RdfSerializer.create().quoteChar('"').build());
+ assertNotNull(RdfSerializer.create().quoteCharOverride('"').build());
+ }
+
+ @Test void f09_rdfXmlSettings() {
+ assertNotNull(RdfSerializer.create().rdfxml_allowBadUris().build());
+ assertNotNull(RdfSerializer.create().rdfxml_allowBadUris(false).build());
+ assertNotNull(RdfSerializer.create().rdfxml_attributeQuoteChar('"').build());
+ assertNotNull(RdfSerializer.create().rdfxml_blockRules("").build());
+ assertNotNull(RdfSerializer.create().rdfxml_disableShowDoctypeDeclaration().build());
+ assertNotNull(RdfSerializer.create().rdfxml_disableShowDoctypeDeclaration(false).build());
+ assertNotNull(RdfSerializer.create().rdfxml_embedding().build());
+ assertNotNull(RdfSerializer.create().rdfxml_embedding(false).build());
+ assertNotNull(RdfSerializer.create().rdfxml_errorMode("default").build());
+ assertNotNull(RdfSerializer.create().rdfxml_iriRules("lax").build());
+ assertNotNull(RdfSerializer.create().rdfxml_longId().build());
+ assertNotNull(RdfSerializer.create().rdfxml_longId(false).build());
+ assertNotNull(RdfSerializer.create().rdfxml_relativeUris("").build());
+ assertNotNull(RdfSerializer.create().rdfxml_showXmlDeclaration("false").build());
+ assertNotNull(RdfSerializer.create().rdfxml_tab(4).build());
+ assertNotNull(RdfSerializer.create().rdfxml_xmlbase("http://example.org/").build());
+ }
+
+ @Test void f10_sortAndOther() {
+ assertNotNull(RdfSerializer.create().sortCollections().build());
+ assertNotNull(RdfSerializer.create().sortCollections(false).build());
+ assertNotNull(RdfSerializer.create().sortMaps().build());
+ assertNotNull(RdfSerializer.create().sortMaps(false).build());
+ assertNotNull(RdfSerializer.create().build());
+ assertNotNull(RdfSerializer.create().build());
+ assertNotNull(RdfSerializer.create().sq().build());
+ assertNotNull(RdfSerializer.create().stopClass(String.class, Object.class).build());
+ assertNotNull(RdfSerializer.create().swaps(new Class<?>[0]).build());
+ assertNotNull(RdfSerializer.create().swaps(new Object[0]).build());
+ assertNotNull(RdfSerializer.create().timeZone(TimeZone.getDefault()).build());
+ assertNotNull(RdfSerializer.create().trimEmptyCollections().build());
+ assertNotNull(RdfSerializer.create().trimEmptyCollections(false).build());
+ assertNotNull(RdfSerializer.create().trimEmptyMaps().build());
+ assertNotNull(RdfSerializer.create().trimEmptyMaps(false).build());
+ assertNotNull(RdfSerializer.create().trimStrings().build());
+ assertNotNull(RdfSerializer.create().trimStrings(false).build());
+ }
+
+ @Test void f11_languageShortcuts() {
+ assertNotNull(RdfSerializer.create().turtle().build());
+ assertNotNull(RdfSerializer.create().jsonLd().build());
+ assertNotNull(RdfSerializer.create().nQuads().build());
+ assertNotNull(RdfSerializer.create().triG().build());
+ assertNotNull(RdfSerializer.create().triX().build());
+ assertNotNull(RdfSerializer.create().rdfJson().build());
+ assertNotNull(RdfSerializer.create().xml().build());
+ assertNotNull(RdfSerializer.create().xmlabbrev().build());
+ }
+
+ @Test void f12_typeAndUri() {
+ assertNotNull(RdfSerializer.create().type(RdfSerializer.class).build());
+ assertNotNull(RdfSerializer.create().typeName(String.class, "myString").build());
+ assertNotNull(RdfSerializer.create().typePropertyName(String.class, "_type").build());
+ assertNotNull(RdfSerializer.create().typePropertyName("_type").build());
+ assertNotNull(RdfSerializer.create().uriContext(UriContext.of("http://localhost", "", "", "")).build());
+ assertNotNull(RdfSerializer.create().uriRelativity(UriRelativity.RESOURCE).build());
+ assertNotNull(RdfSerializer.create().uriResolution(UriResolution.ABSOLUTE).build());
+ assertNotNull(RdfSerializer.create().enumFormat(EnumFormat.NAME).build());
+ assertNotNull(RdfSerializer.create().useJavaBeanIntrospector().build());
+ assertNotNull(RdfSerializer.create().useWhitespace().build());
+ assertNotNull(RdfSerializer.create().useWhitespace(false).build());
+ assertNotNull(RdfSerializer.create().ws().build());
+ }
+ }
+
+ @Nested class G_streamClasses extends TestBase {
+
+ @Test void g01_streamSerializer_rdfthrift_no_produces() {
+ // Build without setting produces() to trigger switch(LANG_RDFTHRIFT) in getProduces()
+ var s = RdfStreamSerializer.create().language(Constants.LANG_RDFTHRIFT).build();
+ assertNotNull(s);
+ }
+
+ @Test void g02_streamSerializer_rdfproto_no_produces() {
+ // Build without setting produces() to trigger switch(LANG_RDFPROTO) in getProduces()
+ var s = RdfStreamSerializer.create().language(Constants.LANG_RDFPROTO).build();
+ assertNotNull(s);
+ }
+
+ @Test void g03_streamSerializer_default_language_no_produces() {
+ // Default language (not THRIFT/PROTO) triggers default case in getProduces()
+ var s = RdfStreamSerializer.create().language("N-TRIPLE").build();
+ assertNotNull(s);
+ }
+
+ @Test void g04_streamSerializer_getDelegationMethods() {
+ // Exercise the delegation methods in RdfStreamSerializer
+ var s = RdfStreamSerializer.create().language(Constants.LANG_RDFTHRIFT).build();
+ var bc = s.getMarshallingContext();
+ var cm = bc.getClassMeta(String.class);
+ assertNotNull(s.getRdfClassMeta(cm));
+ assertNotNull(s.getCollectionFormat());
+ assertNotNull(s.getJuneauNs());
+ assertNotNull(s.getJuneauBpNs());
+ assertNotNull(s.getNamespaces());
+ assertNotNull(s.getLanguage());
+ assertNotNull(s.getRdfSerializer());
+ assertFalse(s.isAddLiteralTypes());
+ assertFalse(s.isAddRootProp());
+ assertFalse(s.isLooseCollections());
+ assertTrue(s.isUseXmlNamespaces());
+ assertTrue(s.isAutoDetectNamespaces());
+ }
+
+ @Test void g05_streamSerializer_copy() {
+ var s = RdfStreamSerializer.create().language(Constants.LANG_RDFTHRIFT).build();
+ var copy = s.copy().build();
+ assertNotNull(copy);
+ }
+
+ @Test void g06_streamParser_rdfthrift_no_consumes() {
+ // Build without setting consumes() to trigger switch(LANG_RDFTHRIFT) in getConsumes()
+ var p = RdfStreamParser.create().language(Constants.LANG_RDFTHRIFT).build();
+ assertNotNull(p);
+ }
+
+ @Test void g07_streamParser_rdfproto_no_consumes() {
+ // Build without setting consumes() to trigger switch(LANG_RDFPROTO) in getConsumes()
+ var p = RdfStreamParser.create().language(Constants.LANG_RDFPROTO).build();
+ assertNotNull(p);
+ }
+
+ @Test void g08_streamParser_default_language_no_consumes() {
+ // Default case in switch
+ var p = RdfStreamParser.create().language("N-TRIPLE").build();
+ assertNotNull(p);
+ }
+
+ @Test void g09_streamParser_getDelegationMethods() {
+ // Exercise the delegation methods in RdfStreamParser
+ var p = RdfStreamParser.create().language(Constants.LANG_RDFTHRIFT).build();
+ var bc = p.getMarshallingContext();
+ var cm = bc.getClassMeta(String.class);
+ assertNotNull(p.getRdfClassMeta(cm));
+ assertNotNull(p.getLanguage());
+ assertNotNull(p.getRdfParser());
+ }
+
+ @Test void g10_streamParser_copy() {
+ var p = RdfStreamParser.create().language(Constants.LANG_RDFTHRIFT).build();
+ var copy = p.copy().build();
+ assertNotNull(copy);
+ }
+
+ @Test void g11_rdfSerializer_xmlMetaProviderMethods() {
+ // Cover getXmlBeanMeta and getXmlBeanPropertyMeta in RdfSerializer
+ var s = RdfSerializer.create().build();
+ var bc = s.getMarshallingContext();
+ var bm = bc.getBeanMeta(NamedBean.class);
+ assertNotNull(bm);
+ assertNotNull(s.getXmlBeanMeta(bm));
+ var bpm = bm.getPropertyMeta("name");
+ assertNotNull(bpm);
+ assertNotNull(s.getXmlBeanPropertyMeta(bpm));
+ assertNotNull(s.getXmlClassMeta(bc.getClassMeta(String.class)));
+ }
+
+ @Test void g12_rdfSerializer_sessionBuilderMethods() {
+ // Cover session builder fluent methods in RdfSerializerSession
+ var s = RdfSerializer.create().build();
+ assertNotNull(s.createSession().apply(String.class, x -> {}).build());
+ assertNotNull(s.createSession().debug(false).build());
+ assertNotNull(s.createSession().javaMethod(null).build());
+ assertNotNull(s.createSession().locale(Locale.US).build());
+ assertNotNull(s.createSession().fileCharset(java.nio.charset.Charset.defaultCharset()).build());
+ assertNotNull(s.createSession().mediaType(org.apache.juneau.commons.http.MediaType.JSON).build());
+ }
+ }
+}
diff --git a/juneau-core/juneau-marshall-rdf/src/test/java/org/apache/juneau/marshall/jena/RdfUtils_Test.java b/juneau-core/juneau-marshall-rdf/src/test/java/org/apache/juneau/marshall/jena/RdfUtils_Test.java
new file mode 100644
index 0000000000..ffa3597fbf
--- /dev/null
+++ b/juneau-core/juneau-marshall-rdf/src/test/java/org/apache/juneau/marshall/jena/RdfUtils_Test.java
@@ -0,0 +1,218 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.juneau.marshall.jena;
+
+import static java.util.Collections.*;
+import static org.junit.jupiter.api.Assertions.*;
+
+import java.lang.reflect.*;
+import java.util.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.marshall.xml.*;
+import org.junit.jupiter.api.*;
+
+class RdfUtils_Test extends TestBase {
+
+ //-----------------------------------------------------------------------------------------------------------------
+ // Helper factory methods
+ //-----------------------------------------------------------------------------------------------------------------
+
+ private static Rdf rdf(String prefix, String namespace) {
+ return RdfAnnotation.create().prefix(prefix).namespace(namespace).build();
+ }
+
+ private static Rdf rdfPrefix(String prefix) {
+ return RdfAnnotation.create().prefix(prefix).build();
+ }
+
+ private static Rdf rdfNamespace(String namespace) {
+ return RdfAnnotation.create().namespace(namespace).build();
+ }
+
+ private static RdfSchema schema(String prefix, String namespace, RdfNs... rdfNs) {
+ return (RdfSchema) Proxy.newProxyInstance(
+ RdfSchema.class.getClassLoader(),
+ new Class<?>[]{ RdfSchema.class },
+ (proxy, method, args) -> switch (method.getName()) {
+ case "prefix" -> prefix;
+ case "namespace" -> namespace;
+ case "rdfNs" -> rdfNs;
+ case "annotationType" -> RdfSchema.class;
+ default -> null;
+ }
+ );
+ }
+
+ private static RdfNs rdfNs(String prefix, String namespaceURI) {
+ return (RdfNs) Proxy.newProxyInstance(
+ RdfNs.class.getClassLoader(),
+ new Class<?>[]{ RdfNs.class },
+ (proxy, method, args) -> switch (method.getName()) {
+ case "prefix" -> prefix;
+ case "namespaceURI" -> namespaceURI;
+ case "annotationType" -> RdfNs.class;
+ default -> null;
+ }
+ );
+ }
+
+ //-----------------------------------------------------------------------------------------------------------------
+ // Tests
+ //-----------------------------------------------------------------------------------------------------------------
+
+ @Test void a01_emptyLists_returnsNull() {
+ assertNull(RdfUtils.findNamespace(emptyList(), emptyList()));
+ }
+
+ @Test void a02_rdf_bothPrefixAndNamespace() {
+ var result = RdfUtils.findNamespace(
+ List.of(rdf("foo", "http://foo/")),
+ emptyList()
+ );
+ assertEquals(Namespace.of("foo", "http://foo/"), result);
+ }
+
+ @Test void a03_rdf_onlyPrefix_foundInOtherRdf() {
+ var result = RdfUtils.findNamespace(
+ List.of(rdfPrefix("foo"), rdf("foo", "http://foo/")),
+ emptyList()
+ );
+ assertEquals(Namespace.of("foo", "http://foo/"), result);
+ }
+
+ @Test void a04_rdf_onlyPrefix_foundInSchema() {
+ var result = RdfUtils.findNamespace(
+ List.of(rdfPrefix("foo")),
+ List.of(schema("foo", "http://foo/"))
+ );
+ assertEquals(Namespace.of("foo", "http://foo/"), result);
+ }
+
+ @Test void a05_rdf_onlyPrefix_foundViaRdfNs() {
+ var result = RdfUtils.findNamespace(
+ List.of(rdfPrefix("foo")),
+ List.of(schema("", "", rdfNs("foo", "http://foo/")))
+ );
+ assertEquals(Namespace.of("foo", "http://foo/"), result);
+ }
+
+ @Test void a06_rdf_onlyPrefix_notFound_throws() {
+ assertThrows(Exception.class, () ->
+ RdfUtils.findNamespace(
+ List.of(rdfPrefix("foo")),
+ emptyList()
+ )
+ );
+ }
+
+ @Test void a07_rdf_onlyNamespace_foundInOtherRdf() {
+ var result = RdfUtils.findNamespace(
+ List.of(rdfNamespace("http://foo/"), rdf("bar", "http://foo/")),
+ emptyList()
+ );
+ assertEquals(Namespace.of("bar", "http://foo/"), result);
+ }
+
+ @Test void a08_rdf_onlyNamespace_foundInSchema() {
+ var result = RdfUtils.findNamespace(
+ List.of(rdfNamespace("http://foo/")),
+ List.of(schema("bar", "http://foo/"))
+ );
+ assertEquals(Namespace.of("bar", "http://foo/"), result);
+ }
+
+ @Test void a09_rdf_onlyNamespace_foundViaRdfNs() {
+ var result = RdfUtils.findNamespace(
+ List.of(rdfNamespace("http://foo/")),
+ List.of(schema("", "", rdfNs("baz", "http://foo/")))
+ );
+ assertEquals(Namespace.of("baz", "http://foo/"), result);
+ }
+
+ @Test void a10_rdf_onlyNamespace_notFound_returnsNull() {
+ var result = RdfUtils.findNamespace(
+ List.of(rdfNamespace("http://foo/")),
+ emptyList()
+ );
+ assertNull(result);
+ }
+
+ @Test void a11_schema_bothPrefixAndNamespace() {
+ var result = RdfUtils.findNamespace(
+ emptyList(),
+ List.of(schema("s", "http://s/"))
+ );
+ assertEquals(Namespace.of("s", "http://s/"), result);
+ }
+
+ @Test void a12_schema_onlyPrefix_foundViaRdfNs() {
+ var result = RdfUtils.findNamespace(
+ emptyList(),
+ List.of(schema("s", "", rdfNs("s", "http://s/")))
+ );
+ assertEquals(Namespace.of("s", "http://s/"), result);
+ }
+
+ @Test void a13_schema_neitherSpecified_returnsNull() {
+ var result = RdfUtils.findNamespace(
+ emptyList(),
+ List.of(schema("", ""))
+ );
+ assertNull(result);
+ }
+
+ @Test void a14_rdf_onlyPrefix_nonMatchingRdfScanned() {
+ var result = RdfUtils.findNamespace(
+ List.of(rdfPrefix("foo"), rdfPrefix("bar")),
+ List.of(schema("foo", "http://foo/"))
+ );
+ assertEquals(Namespace.of("foo", "http://foo/"), result);
+ }
+
+ @Test void a15_rdf_onlyPrefix_foundViaRdfNs_nonMatchingFirst() {
+ var result = RdfUtils.findNamespace(
+ List.of(rdfPrefix("foo")),
+ List.of(schema("", "", rdfNs("other", "http://other/"), rdfNs("foo", "http://foo/")))
+ );
+ assertEquals(Namespace.of("foo", "http://foo/"), result);
+ }
+
+ @Test void a16_rdf_onlyNamespace_nonMatchingRdfScanned() {
+ var result = RdfUtils.findNamespace(
+ List.of(rdfNamespace("http://foo/"), rdf("baz", "http://baz/")),
+ List.of(schema("bar", "http://foo/"))
+ );
+ assertEquals(Namespace.of("bar", "http://foo/"), result);
+ }
+
+ @Test void a17_rdf_onlyNamespace_nonMatchingSchemaScanned() {
+ var result = RdfUtils.findNamespace(
+ List.of(rdfNamespace("http://foo/")),
+ List.of(schema("other", "http://other/"), schema("bar", "http://foo/"))
+ );
+ assertEquals(Namespace.of("bar", "http://foo/"), result);
+ }
+
+ @Test void a18_rdf_onlyNamespace_nonMatchingRdfNsScanned() {
+ var result = RdfUtils.findNamespace(
+ List.of(rdfNamespace("http://foo/")),
+ List.of(schema("", "", rdfNs("other", "http://other/"), rdfNs("baz", "http://foo/")))
+ );
+ assertEquals(Namespace.of("baz", "http://foo/"), result);
+ }
+}
diff --git a/juneau-core/juneau-marshall/files/Test3.properties b/juneau-core/juneau-marshall/files/Test3.properties
new file mode 100644
index 0000000000..90a3dcdab9
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/Test3.properties
@@ -0,0 +1,15 @@
+# ***************************************************************************************************************************
+# * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+# * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+# * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+# * with the License. You may obtain a copy of the License at *
+# * *
+# * http://www.apache.org/licenses/LICENSE-2.0 *
+# * *
+# * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+# * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+# * specific language governing permissions and limitations under the License. *
+# * *
+# ***************************************************************************************************************************
+
+file=files/Test3.properties
diff --git a/juneau-core/juneau-marshall/files/Test3_ja.properties b/juneau-core/juneau-marshall/files/Test3_ja.properties
new file mode 100644
index 0000000000..4ffd31e36b
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/Test3_ja.properties
@@ -0,0 +1,15 @@
+# ***************************************************************************************************************************
+# * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+# * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+# * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+# * with the License. You may obtain a copy of the License at *
+# * *
+# * http://www.apache.org/licenses/LICENSE-2.0 *
+# * *
+# * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+# * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+# * specific language governing permissions and limitations under the License. *
+# * *
+# ***************************************************************************************************************************
+
+file=files/Test3_ja.properties
diff --git a/juneau-core/juneau-marshall/files/Test3_ja_JP.properties b/juneau-core/juneau-marshall/files/Test3_ja_JP.properties
new file mode 100644
index 0000000000..ed1139fea8
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/Test3_ja_JP.properties
@@ -0,0 +1,15 @@
+# ***************************************************************************************************************************
+# * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+# * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+# * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+# * with the License. You may obtain a copy of the License at *
+# * *
+# * http://www.apache.org/licenses/LICENSE-2.0 *
+# * *
+# * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+# * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+# * specific language governing permissions and limitations under the License. *
+# * *
+# ***************************************************************************************************************************
+
+file=files/Test3_ja_JP.properties
diff --git a/juneau-core/juneau-marshall/files/test1/.c b/juneau-core/juneau-marshall/files/test1/.c
new file mode 100644
index 0000000000..7af678d5bc
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/.c
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/.c]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/.c_ja b/juneau-core/juneau-marshall/files/test1/.c_ja
new file mode 100644
index 0000000000..3ff0dbaf23
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/.c_ja
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/.c_ja]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/.c_ja_JP b/juneau-core/juneau-marshall/files/test1/.c_ja_JP
new file mode 100644
index 0000000000..7cd431226f
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/.c_ja_JP
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/.c_ja_JP]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/.d.txt b/juneau-core/juneau-marshall/files/test1/.d.txt
new file mode 100644
index 0000000000..98c36b1781
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/.d.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/.d.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/.d_ja.txt b/juneau-core/juneau-marshall/files/test1/.d_ja.txt
new file mode 100644
index 0000000000..967407553a
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/.d_ja.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/.d_ja.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/.d_ja_JP.txt b/juneau-core/juneau-marshall/files/test1/.d_ja_JP.txt
new file mode 100644
index 0000000000..e1a2276501
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/.d_ja_JP.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/.d_ja_JP.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/_a.txt b/juneau-core/juneau-marshall/files/test1/_a.txt
new file mode 100644
index 0000000000..4f518832e7
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/_a.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/_a.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/_a_ja.txt b/juneau-core/juneau-marshall/files/test1/_a_ja.txt
new file mode 100644
index 0000000000..a2b6a922a3
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/_a_ja.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/_a_ja.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/_a_ja_JP.txt b/juneau-core/juneau-marshall/files/test1/_a_ja_JP.txt
new file mode 100644
index 0000000000..32f4ff2e3d
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/_a_ja_JP.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/_a_ja_JP.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/_b b/juneau-core/juneau-marshall/files/test1/_b
new file mode 100644
index 0000000000..3ccf50652c
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/_b
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/_b]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/_b_ja b/juneau-core/juneau-marshall/files/test1/_b_ja
new file mode 100644
index 0000000000..b3a32ee8a3
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/_b_ja
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/_b_ja]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/_b_ja_JP b/juneau-core/juneau-marshall/files/test1/_b_ja_JP
new file mode 100644
index 0000000000..4b9c30f4eb
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/_b_ja_JP
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/_b_ja_JP]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/.c b/juneau-core/juneau-marshall/files/test1/dir/.c
new file mode 100644
index 0000000000..2dd1da6ca2
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/.c
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/.c]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/.c_ja b/juneau-core/juneau-marshall/files/test1/dir/.c_ja
new file mode 100644
index 0000000000..900f0e3035
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/.c_ja
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/.c_ja]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/.c_ja_JP b/juneau-core/juneau-marshall/files/test1/dir/.c_ja_JP
new file mode 100644
index 0000000000..b1b584b11e
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/.c_ja_JP
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/.c_ja_JP]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/.d.txt b/juneau-core/juneau-marshall/files/test1/dir/.d.txt
new file mode 100644
index 0000000000..70072ab454
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/.d.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/.d.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/.d_ja.txt b/juneau-core/juneau-marshall/files/test1/dir/.d_ja.txt
new file mode 100644
index 0000000000..a87cd508e0
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/.d_ja.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/.d_ja.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/.d_ja_JP.txt b/juneau-core/juneau-marshall/files/test1/dir/.d_ja_JP.txt
new file mode 100644
index 0000000000..739a7dde55
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/.d_ja_JP.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/.d_ja_JP.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/_a.txt b/juneau-core/juneau-marshall/files/test1/dir/_a.txt
new file mode 100644
index 0000000000..2a65cf1df4
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/_a.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/_a.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/_a_ja.txt b/juneau-core/juneau-marshall/files/test1/dir/_a_ja.txt
new file mode 100644
index 0000000000..2c341cdb92
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/_a_ja.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/_a_ja.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/_a_ja_JP.txt b/juneau-core/juneau-marshall/files/test1/dir/_a_ja_JP.txt
new file mode 100644
index 0000000000..0585027b24
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/_a_ja_JP.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/_a_ja_JP.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/_b b/juneau-core/juneau-marshall/files/test1/dir/_b
new file mode 100644
index 0000000000..d6e804e949
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/_b
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/_b]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/_b_ja b/juneau-core/juneau-marshall/files/test1/dir/_b_ja
new file mode 100644
index 0000000000..fbe71f4b72
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/_b_ja
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/_b_ja]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/_b_ja_JP b/juneau-core/juneau-marshall/files/test1/dir/_b_ja_JP
new file mode 100644
index 0000000000..a6a36e7ec0
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/_b_ja_JP
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/_b_ja_JP]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/dir/.c b/juneau-core/juneau-marshall/files/test1/dir/dir/.c
new file mode 100644
index 0000000000..9ebd1b5542
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/dir/.c
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/dir/.c]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/dir/.c_ja b/juneau-core/juneau-marshall/files/test1/dir/dir/.c_ja
new file mode 100644
index 0000000000..38f87f3d6b
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/dir/.c_ja
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/dir/.c_ja]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/dir/.c_ja_JP b/juneau-core/juneau-marshall/files/test1/dir/dir/.c_ja_JP
new file mode 100644
index 0000000000..fe98ced67d
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/dir/.c_ja_JP
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/dir/.c_ja_JP]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/dir/.d.txt b/juneau-core/juneau-marshall/files/test1/dir/dir/.d.txt
new file mode 100644
index 0000000000..574e7b83c6
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/dir/.d.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/dir/.d.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/dir/.d_ja.txt b/juneau-core/juneau-marshall/files/test1/dir/dir/.d_ja.txt
new file mode 100644
index 0000000000..e2e4c92889
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/dir/.d_ja.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/dir/.d_ja.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/dir/.d_ja_JP.txt b/juneau-core/juneau-marshall/files/test1/dir/dir/.d_ja_JP.txt
new file mode 100644
index 0000000000..b631019e2d
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/dir/.d_ja_JP.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/dir/.d_ja_JP.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/dir/_a.txt b/juneau-core/juneau-marshall/files/test1/dir/dir/_a.txt
new file mode 100644
index 0000000000..e264e90d56
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/dir/_a.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/dir/_a.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/dir/_a_ja.txt b/juneau-core/juneau-marshall/files/test1/dir/dir/_a_ja.txt
new file mode 100644
index 0000000000..23d2a91e5b
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/dir/_a_ja.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/dir/_a_ja.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/dir/_a_ja_JP.txt b/juneau-core/juneau-marshall/files/test1/dir/dir/_a_ja_JP.txt
new file mode 100644
index 0000000000..d506fc9fd0
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/dir/_a_ja_JP.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/dir/_a_ja_JP.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/dir/_b b/juneau-core/juneau-marshall/files/test1/dir/dir/_b
new file mode 100644
index 0000000000..19f7d2bd26
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/dir/_b
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/dir/_b]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/dir/_b_ja b/juneau-core/juneau-marshall/files/test1/dir/dir/_b_ja
new file mode 100644
index 0000000000..8b80ee1a1d
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/dir/_b_ja
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/dir/_b_ja]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/dir/_b_ja_JP b/juneau-core/juneau-marshall/files/test1/dir/dir/_b_ja_JP
new file mode 100644
index 0000000000..16315491c4
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/dir/_b_ja_JP
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/dir/_b_ja_JP]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/dir/e.txt b/juneau-core/juneau-marshall/files/test1/dir/dir/e.txt
new file mode 100644
index 0000000000..f684e88397
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/dir/e.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/dir/e.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/dir/e_ja.txt b/juneau-core/juneau-marshall/files/test1/dir/dir/e_ja.txt
new file mode 100644
index 0000000000..fff01e3999
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/dir/e_ja.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/dir/e_ja.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/dir/e_ja_JP.txt b/juneau-core/juneau-marshall/files/test1/dir/dir/e_ja_JP.txt
new file mode 100644
index 0000000000..fa779fff2e
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/dir/e_ja_JP.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/dir/e_ja_JP.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/dir/f b/juneau-core/juneau-marshall/files/test1/dir/dir/f
new file mode 100644
index 0000000000..3df3ae33b7
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/dir/f
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/dir/f]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/dir/f_ja b/juneau-core/juneau-marshall/files/test1/dir/dir/f_ja
new file mode 100644
index 0000000000..23c7f9e0a2
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/dir/f_ja
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/dir/f_ja]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/dir/f_ja_JP b/juneau-core/juneau-marshall/files/test1/dir/dir/f_ja_JP
new file mode 100644
index 0000000000..fdf0182524
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/dir/f_ja_JP
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/dir/f_ja_JP]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/dir/g_foo.txt b/juneau-core/juneau-marshall/files/test1/dir/dir/g_foo.txt
new file mode 100644
index 0000000000..990e961fc0
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/dir/g_foo.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/dir/g_foo.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/dir/g_foo_ja.txt b/juneau-core/juneau-marshall/files/test1/dir/dir/g_foo_ja.txt
new file mode 100644
index 0000000000..0d807c228b
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/dir/g_foo_ja.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/dir/g_foo_ja.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/dir/g_foo_ja_JP.txt b/juneau-core/juneau-marshall/files/test1/dir/dir/g_foo_ja_JP.txt
new file mode 100644
index 0000000000..cfba2b86ca
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/dir/g_foo_ja_JP.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/dir/g_foo_ja_JP.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/dir/h.foo.txt b/juneau-core/juneau-marshall/files/test1/dir/dir/h.foo.txt
new file mode 100644
index 0000000000..3acdf38fec
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/dir/h.foo.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/dir/h.foo.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/dir/h.foo_ja.txt b/juneau-core/juneau-marshall/files/test1/dir/dir/h.foo_ja.txt
new file mode 100644
index 0000000000..2b2732e084
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/dir/h.foo_ja.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/dir/h.foo_ja.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/dir/h.foo_ja_JP.txt b/juneau-core/juneau-marshall/files/test1/dir/dir/h.foo_ja_JP.txt
new file mode 100644
index 0000000000..7b94f58ecd
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/dir/h.foo_ja_JP.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/dir/h.foo_ja_JP.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/dir/i_foo b/juneau-core/juneau-marshall/files/test1/dir/dir/i_foo
new file mode 100644
index 0000000000..02ec78b01b
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/dir/i_foo
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/dir/i_foo]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/dir/i_foo_ja b/juneau-core/juneau-marshall/files/test1/dir/dir/i_foo_ja
new file mode 100644
index 0000000000..7cf9a1f5a6
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/dir/i_foo_ja
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/dir/i_foo_ja]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/dir/i_foo_ja_JP b/juneau-core/juneau-marshall/files/test1/dir/dir/i_foo_ja_JP
new file mode 100644
index 0000000000..e5d3c99778
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/dir/i_foo_ja_JP
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/dir/i_foo_ja_JP]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/e.txt b/juneau-core/juneau-marshall/files/test1/dir/e.txt
new file mode 100644
index 0000000000..dc2b73be65
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/e.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/e.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/e_ja.txt b/juneau-core/juneau-marshall/files/test1/dir/e_ja.txt
new file mode 100644
index 0000000000..ad5d91f53c
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/e_ja.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/e_ja.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/e_ja_JP.txt b/juneau-core/juneau-marshall/files/test1/dir/e_ja_JP.txt
new file mode 100644
index 0000000000..5f45ac0a59
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/e_ja_JP.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/e_ja_JP.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/f b/juneau-core/juneau-marshall/files/test1/dir/f
new file mode 100644
index 0000000000..bfe33e47a7
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/f
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/f]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/f_ja b/juneau-core/juneau-marshall/files/test1/dir/f_ja
new file mode 100644
index 0000000000..60cf49877e
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/f_ja
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/f_ja]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/f_ja_JP b/juneau-core/juneau-marshall/files/test1/dir/f_ja_JP
new file mode 100644
index 0000000000..1f518e43fc
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/f_ja_JP
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/f_ja_JP]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/g_foo.txt b/juneau-core/juneau-marshall/files/test1/dir/g_foo.txt
new file mode 100644
index 0000000000..4be896970a
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/g_foo.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/g_foo.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/g_foo_ja.txt b/juneau-core/juneau-marshall/files/test1/dir/g_foo_ja.txt
new file mode 100644
index 0000000000..081277de7c
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/g_foo_ja.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/g_foo_ja.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/g_foo_ja_JP.txt b/juneau-core/juneau-marshall/files/test1/dir/g_foo_ja_JP.txt
new file mode 100644
index 0000000000..f586ad8746
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/g_foo_ja_JP.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/g_foo_ja_JP.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/h.foo.txt b/juneau-core/juneau-marshall/files/test1/dir/h.foo.txt
new file mode 100644
index 0000000000..292af7e710
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/h.foo.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/h.foo.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/h.foo_ja.txt b/juneau-core/juneau-marshall/files/test1/dir/h.foo_ja.txt
new file mode 100644
index 0000000000..8e0edc9212
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/h.foo_ja.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/h.foo_ja.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/h.foo_ja_JP.txt b/juneau-core/juneau-marshall/files/test1/dir/h.foo_ja_JP.txt
new file mode 100644
index 0000000000..824c8f9462
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/h.foo_ja_JP.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/h.foo_ja_JP.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/i_foo b/juneau-core/juneau-marshall/files/test1/dir/i_foo
new file mode 100644
index 0000000000..9fcbf0028c
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/i_foo
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/i_foo]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/i_foo_ja b/juneau-core/juneau-marshall/files/test1/dir/i_foo_ja
new file mode 100644
index 0000000000..db681f6c5e
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/i_foo_ja
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/i_foo_ja]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/dir/i_foo_ja_JP b/juneau-core/juneau-marshall/files/test1/dir/i_foo_ja_JP
new file mode 100644
index 0000000000..366557a9ec
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/dir/i_foo_ja_JP
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/dir/i_foo_ja_JP]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/e.txt b/juneau-core/juneau-marshall/files/test1/e.txt
new file mode 100644
index 0000000000..654467f0cc
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/e.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/e.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/e_ja.txt b/juneau-core/juneau-marshall/files/test1/e_ja.txt
new file mode 100644
index 0000000000..05a9c4da04
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/e_ja.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/e_ja.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/e_ja_JP.txt b/juneau-core/juneau-marshall/files/test1/e_ja_JP.txt
new file mode 100644
index 0000000000..a805e63f0c
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/e_ja_JP.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/e_ja_JP.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/f b/juneau-core/juneau-marshall/files/test1/f
new file mode 100644
index 0000000000..44c65b871f
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/f
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/f]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/f_ja b/juneau-core/juneau-marshall/files/test1/f_ja
new file mode 100644
index 0000000000..4e24153fb9
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/f_ja
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/f_ja]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/f_ja_JP b/juneau-core/juneau-marshall/files/test1/f_ja_JP
new file mode 100644
index 0000000000..a08f087fd6
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/f_ja_JP
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/f_ja_JP]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/g_foo.txt b/juneau-core/juneau-marshall/files/test1/g_foo.txt
new file mode 100644
index 0000000000..d7ec74a115
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/g_foo.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/g_foo.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/g_foo_ja.txt b/juneau-core/juneau-marshall/files/test1/g_foo_ja.txt
new file mode 100644
index 0000000000..b33b1310ea
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/g_foo_ja.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/g_foo_ja.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/g_foo_ja_JP.txt b/juneau-core/juneau-marshall/files/test1/g_foo_ja_JP.txt
new file mode 100644
index 0000000000..02eee785ac
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/g_foo_ja_JP.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/g_foo_ja_JP.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/h.foo.txt b/juneau-core/juneau-marshall/files/test1/h.foo.txt
new file mode 100644
index 0000000000..786bcd8de0
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/h.foo.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/h.foo.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/h.foo_ja.txt b/juneau-core/juneau-marshall/files/test1/h.foo_ja.txt
new file mode 100644
index 0000000000..b25ce637fa
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/h.foo_ja.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/h.foo_ja.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/h.foo_ja_JP.txt b/juneau-core/juneau-marshall/files/test1/h.foo_ja_JP.txt
new file mode 100644
index 0000000000..4157911bd3
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/h.foo_ja_JP.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/h.foo_ja_JP.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/i_foo b/juneau-core/juneau-marshall/files/test1/i_foo
new file mode 100644
index 0000000000..b8d5f7646b
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/i_foo
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/i_foo]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/i_foo_ja b/juneau-core/juneau-marshall/files/test1/i_foo_ja
new file mode 100644
index 0000000000..23b02d7e21
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/i_foo_ja
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/i_foo_ja]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test1/i_foo_ja_JP b/juneau-core/juneau-marshall/files/test1/i_foo_ja_JP
new file mode 100644
index 0000000000..aafbdd07ca
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test1/i_foo_ja_JP
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test1/i_foo_ja_JP]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test2/a.txt b/juneau-core/juneau-marshall/files/test2/a.txt
new file mode 100644
index 0000000000..86421a6e23
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test2/a.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test2/a.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test2/dir/a.txt b/juneau-core/juneau-marshall/files/test2/dir/a.txt
new file mode 100644
index 0000000000..627f230d4e
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test2/dir/a.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test2/dir/a.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test2/dir/dir/a.txt b/juneau-core/juneau-marshall/files/test2/dir/dir/a.txt
new file mode 100644
index 0000000000..f3d7b9fff3
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test2/dir/dir/a.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test2/dir/dir/a.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test2/ja/JP/a.txt b/juneau-core/juneau-marshall/files/test2/ja/JP/a.txt
new file mode 100644
index 0000000000..805e644273
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test2/ja/JP/a.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test2/ja/JP/a.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test2/ja/JP/dir/a.txt b/juneau-core/juneau-marshall/files/test2/ja/JP/dir/a.txt
new file mode 100644
index 0000000000..8b1b3885d8
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test2/ja/JP/dir/a.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test2/ja/JP/dir/a.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test2/ja/JP/dir/dir/a.txt b/juneau-core/juneau-marshall/files/test2/ja/JP/dir/dir/a.txt
new file mode 100644
index 0000000000..54fd904a7b
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test2/ja/JP/dir/dir/a.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test2/ja/JP/dir/dir/a.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test2/ja/a.txt b/juneau-core/juneau-marshall/files/test2/ja/a.txt
new file mode 100644
index 0000000000..c65082f8ce
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test2/ja/a.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test2/ja/a.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test2/ja/dir/a.txt b/juneau-core/juneau-marshall/files/test2/ja/dir/a.txt
new file mode 100644
index 0000000000..b3fa679b20
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test2/ja/dir/a.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test2/ja/dir/a.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/files/test2/ja/dir/dir/a.txt b/juneau-core/juneau-marshall/files/test2/ja/dir/dir/a.txt
new file mode 100644
index 0000000000..d32a44b661
--- /dev/null
+++ b/juneau-core/juneau-marshall/files/test2/ja/dir/dir/a.txt
@@ -0,0 +1,13 @@
+***************************************************************************************************************************
+* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+* distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+* to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+* with the License. You may obtain a copy of the License at *
+* *
+* http://www.apache.org/licenses/LICENSE-2.0 *
+* *
+* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+* specific language governing permissions and limitations under the License. *
+***************************************************************************************************************************
+[home:/files/test2/ja/dir/dir/a.txt]
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/MarshalledPropertyPostProcessor.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/MarshalledPropertyPostProcessor.java
index 9c48f13ad4..033a24731d 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/MarshalledPropertyPostProcessor.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/MarshalledPropertyPostProcessor.java
@@ -203,7 +203,8 @@ final class MarshalledPropertyPostProcessor implements BeanPropertyPostProcessor
*/
@SuppressWarnings({
"java:S3776", // Centralized swap-transform wiring; branching mirrors swap/no-swap and child-swap read/write paths.
- "unchecked" // Wildcard ObjectSwap captured from Object-typed builder fields for runtime polymorphic dispatch.
+ "unchecked", // Wildcard ObjectSwap captured from Object-typed builder fields for runtime polymorphic dispatch.
+ "null" // `sw` may be null but is guarded by `nn(sw)` before access; Eclipse doesn't recognise `nn()` as a null-check function.
})
static void installSwapAwareTransforms(BeanPropertyMeta.Builder p) {
ObjectSwap<?,?> sw = (ObjectSwap<?,?>) p.swap;
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/MarshallingContext.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/MarshallingContext.java
index 95c24aa5ad..8858170e85 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/MarshallingContext.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/MarshallingContext.java
@@ -4231,7 +4231,8 @@ public class MarshallingContext extends Context implements ConversionFinder, Bea
@Override
@SuppressWarnings({
"java:S3776", // Cognitive complexity acceptable for comprehensive conversion dispatch
- "java:S6541" // Brain Method: conversion dispatch inherently requires handling many type pairs in one place
+ "java:S6541", // Brain Method: conversion dispatch inherently requires handling many type pairs in one place
+ "null" // `builder` is guarded by `nn(builder)` before access; Eclipse doesn't recognise `nn()` as a null-check function.
})
public Conversion<?,?> findConversion(Class<?> inType, Class<?> outType) {
var toMeta = getClassMeta(outType);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/xml/XmlParserSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/xml/XmlParserSession.java
index 0fae6b0442..ab840a7bcb 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/xml/XmlParserSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/xml/XmlParserSession.java
@@ -271,8 +271,9 @@ public class XmlParserSession extends ReaderParserSession {
}
@SuppressWarnings({
- "null", // Null handling verified by context or framework
- "java:S3776", // Cognitive complexity acceptable for this specific logic
+ "null", // Null handling verified by context or framework
+ "java:S3776", // Cognitive complexity acceptable for this specific logic
+ "java:S6541", // Brain Method — complex XML parsing logic; structural refactoring would reduce readability without meaningful benefit.
})
private Object getUnknown(XmlReader r) throws IOException, ParseException, ExecutableException, XMLStreamException {
if (r.getEventType() != START_ELEMENT) {
@@ -754,8 +755,9 @@ public class XmlParserSession extends ReaderParserSession {
* @throws XMLStreamException Malformed XML encountered.
*/
@SuppressWarnings({
- "null", // Null handling verified by context or framework
- "java:S3776", // Cognitive complexity acceptable for this specific logic
+ "null", // Null handling verified by context or framework
+ "java:S3776", // Cognitive complexity acceptable for this specific logic
+ "java:S6541", // Brain Method — complex XML parsing logic; structural refactoring would reduce readability without meaningful benefit.
})
protected <T> T parseAnything(ClassMeta<T> eType, String currAttr, XmlReader r, Object outer, boolean isRoot, BeanPropertyMeta pMeta)
throws IOException, ParseException, ExecutableException, XMLStreamException {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/xml/XmlSerializerSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/xml/XmlSerializerSession.java
index d140f75eb3..d4f5a7782e 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/xml/XmlSerializerSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/xml/XmlSerializerSession.java
@@ -198,9 +198,6 @@ public class XmlSerializerSession extends WriterSerializerSession {
/**
* Identifies what the contents were of a serialized bean.
*/
- @SuppressWarnings({
- "javadoc" // Enum values are self-documenting
- })
public enum ContentResult {
CR_VOID, // No content...append "/>" to the start tag.
CR_EMPTY, // No content...append "/>" to the start tag if XML, "/></end>" if HTML.
diff --git a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/TestUtils.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/TestUtils.java
index 53f16cac0e..c87ee5a3f0 100644
--- a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/TestUtils.java
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/TestUtils.java
@@ -31,7 +31,6 @@ import java.util.stream.*;
import org.apache.juneau.commons.bean.*;
import org.apache.juneau.commons.utils.*;
-import org.apache.juneau.junit.bct.*;
import org.apache.juneau.marshall.serializer.*;
import org.apache.juneau.marshall.xml.*;
import org.junit.jupiter.api.*;
@@ -44,7 +43,8 @@ import org.junit.jupiter.api.*;
*/
@SuppressWarnings({
"unchecked", // BeanTester cast and generic type handling in test utilities
- "java:S1172" // Parameters kept for consistent method signatures across test utilities
+ "java:S1172", // Parameters kept for consistent method signatures across test utilities
+ "unused" // Unused parameters/variables kept for consistent method signatures across test utilities.
})
public class TestUtils extends Utils {
@@ -92,7 +92,9 @@ public class TestUtils extends Utils {
/**
* Validates that the whitespace is correct in the specified XML.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void checkXmlWhitespace(String out) throws Exception {
if (out.indexOf('\u0000') != -1) {
for (var s : out.split("\u0000"))
@@ -265,7 +267,9 @@ public class TestUtils extends Utils {
/**
* Validates XML whitespace and namespace formatting on a serialized object.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void validateXml(Object o) throws Exception {
validateXml(o, XmlSerializer.DEFAULT_NS_SQ);
}
@@ -273,7 +277,9 @@ public class TestUtils extends Utils {
/**
* Validates XML whitespace and namespace formatting on a serialized object.
*/
- @SuppressWarnings("java:S112")
+ @SuppressWarnings({
+ "java:S112" // Generic exception throw required; checked exception wrapping would obscure test intent.
+ })
public static final void validateXml(Object o, XmlSerializer s) throws Exception {
s = s.copy().ws().ns().addNamespaceUrisToRoot().build();
var xml = s.serialize(o);
@@ -302,10 +308,10 @@ public class TestUtils extends Utils {
var tagEnd = html.indexOf('>', i);
if (tagEnd == -1) break;
var tag = html.substring(i, tagEnd + 1);
- var matches = withAttributes == null || withAttributes.isEmpty();
- if (!matches) {
- matches = true;
- for (var entry : withAttributes.entrySet()) {
+ var matches = withAttributes == null || withAttributes.isEmpty();
+ if (!matches && withAttributes != null) {
+ matches = true;
+ for (var entry : withAttributes.entrySet()) {
if (!tag.contains(entry.getKey() + "=\"" + entry.getValue() + "\"") && !tag.contains(entry.getKey() + "='" + entry.getValue() + "'")) {
matches = false;
break;
diff --git a/juneau-utest/src/test/java/org/apache/juneau/cp/FileFinder_Test.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/cp/FileFinder_Test.java
similarity index 99%
copy from juneau-utest/src/test/java/org/apache/juneau/cp/FileFinder_Test.java
copy to juneau-core/juneau-marshall/src/test/java/org/apache/juneau/cp/FileFinder_Test.java
index 8bcdf7a5fe..e4ed1669e6 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/cp/FileFinder_Test.java
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/cp/FileFinder_Test.java
@@ -34,9 +34,10 @@ import org.junit.jupiter.api.*;
@SuppressWarnings({
- "java:S117", // S5786: Must be public for cross-package subclass FileFinder_Test2
+ "java:S117", // S5786: Must be public for cross-package subclass FileFinder_Test2
"java:S5961", // High assertion count acceptable in comprehensive tests
- "java:S5786", // JUnit assertions preferred but not required in all test scenarios
+ "java:S5976", // JUnit assertions preferred but not required in all test scenarios
+ "resource" // Stream/reader instances are intentional short-lived test fixtures; auto-close not required for these assertions.
})
public class FileFinder_Test extends TestBase {
diff --git a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/cp/Messages_Test.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/cp/Messages_Test.java
new file mode 100644
index 0000000000..38099200b0
--- /dev/null
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/cp/Messages_Test.java
@@ -0,0 +1,160 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.juneau.cp;
+
+import static java.util.Locale.*;
+import static org.apache.juneau.junit.bct.BctAssertions.*;
+import static org.junit.jupiter.api.Assertions.*;
+
+import java.util.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.cp.test3.*;
+import org.apache.juneau.cp.test4.*;
+import org.apache.juneau.marshall.cp.*;
+import org.junit.jupiter.api.*;
+
+@SuppressWarnings({
+ "java:S4144" // Identical test methods intentional for testing different scenarios
+})
+class Messages_Test extends TestBase {
+
+ @Test void a01_sameDirectory() {
+ var x1 = Messages.of(MessageBundleTest1.class);
+ assertEquals("MessageBundleTest1.properties", x1.getString("file"));
+ assertEquals("MessageBundleTest1_ja.properties", x1.forLocale(JAPANESE).getString("file"));
+ assertEquals("MessageBundleTest1_ja_JP.properties", x1.forLocale(JAPAN).getString("file"));
+ assertEquals("MessageBundleTest1.properties", x1.forLocale(CHINA).getString("file"));
+ assertEquals("MessageBundleTest1.properties", x1.forLocale((Locale)null).getString("file"));
+ }
+
+ @Test void a02_customName() {
+ var x1 = Messages.of(MessageBundleTest1.class, "files/Test1");
+ assertEquals("files/Test1.properties", x1.getString("file"));
+ assertEquals("files/Test1_ja.properties", x1.forLocale(JAPANESE).getString("file"));
+ assertEquals("files/Test1_ja_JP.properties", x1.forLocale(JAPAN).getString("file"));
+ assertEquals("files/Test1.properties", x1.forLocale(CHINA).getString("file"));
+ assertEquals("files/Test1.properties", x1.forLocale((Locale)null).getString("file"));
+
+ var x2 = Messages.create(MessageBundleTest1.class).name(null).build();
+ assertEquals("MessageBundleTest1.properties", x2.getString("file"));
+ assertEquals("MessageBundleTest1_ja.properties", x2.forLocale(JAPANESE).getString("file"));
+ assertEquals("MessageBundleTest1_ja_JP.properties", x2.forLocale(JAPAN).getString("file"));
+ assertEquals("MessageBundleTest1.properties", x2.forLocale(CHINA).getString("file"));
+ assertEquals("MessageBundleTest1.properties", x2.forLocale((Locale)null).getString("file"));
+ }
+
+ @Test void a03_customSearchPaths() {
+ var x = Messages.create(MessageBundleTest1.class).name("Test1").baseNames("{package}.files.{name}").build();
+ assertEquals("files/Test1.properties", x.getString("file"));
+ assertEquals("files/Test1_ja.properties", x.forLocale(JAPANESE).getString("file"));
+ assertEquals("files/Test1_ja_JP.properties", x.forLocale(JAPAN).getString("file"));
+ assertEquals("files/Test1.properties", x.forLocale(CHINA).getString("file"));
+ assertEquals("files/Test1.properties", x.forLocale((Locale)null).getString("file"));
+
+ var x2 = Messages.create(MessageBundleTest1.class).name("Test1").baseNames((String[])null).build();
+ assertEquals("{!file}", x2.getString("file"));
+ }
+
+ @Test void a04_customLocale() {
+ var x1 = Messages.create(MessageBundleTest1.class).locale(Locale.JAPAN).build();
+ assertEquals("MessageBundleTest1_ja_JP.properties", x1.getString("file"));
+ assertEquals("MessageBundleTest1_ja.properties", x1.forLocale(JAPANESE).getString("file"));
+ assertEquals("MessageBundleTest1_ja_JP.properties", x1.forLocale(JAPAN).getString("file"));
+ assertEquals("MessageBundleTest1.properties", x1.forLocale(CHINA).getString("file"));
+ assertEquals("MessageBundleTest1.properties", x1.forLocale((Locale)null).getString("file"));
+
+ var x2 = Messages.create(MessageBundleTest1.class).locale((Locale)null).build();
+ assertEquals("MessageBundleTest1.properties", x2.getString("file"));
+ assertEquals("MessageBundleTest1_ja.properties", x2.forLocale(JAPANESE).getString("file"));
+ assertEquals("MessageBundleTest1_ja_JP.properties", x2.forLocale(JAPAN).getString("file"));
+ assertEquals("MessageBundleTest1.properties", x2.forLocale(CHINA).getString("file"));
+ assertEquals("MessageBundleTest1.properties", x2.forLocale((Locale)null).getString("file"));
+ }
+
+ @Test void a05_nonExistentBundle() {
+ var x1 = Messages.of(MessageBundleTest1.class, "Bad");
+ assertEquals("{!file}", x1.getString("file"));
+ assertEquals("{!file}", x1.forLocale(JAPANESE).getString("file"));
+ assertEquals("{!file}", x1.forLocale(JAPAN).getString("file"));
+ assertEquals("{!file}", x1.forLocale(CHINA).getString("file"));
+ assertEquals("{!file}", x1.forLocale((Locale)null).getString("file"));
+
+ var x2 = x1.forLocale(JAPANESE);
+ assertEquals("{!file}", x2.getString("file"));
+ }
+
+ @Test void a06_parent() {
+ var x1 = Messages.create(MessageBundleTest1.class).name("Bad").parent(Messages.of(Test2.class)).build();
+ assertEquals("Test2.properties", x1.getString("file"));
+ assertEquals("Test2_ja.properties", x1.forLocale(JAPANESE).getString("file"));
+ assertEquals("Test2_ja_JP.properties", x1.forLocale(JAPAN).getString("file"));
+ assertEquals("Test2.properties", x1.forLocale(CHINA).getString("file"));
+ assertEquals("Test2.properties", x1.forLocale((Locale)null).getString("file"));
+
+ var x2 = Messages.create(MessageBundleTest1.class).parent(Messages.of(Test2.class)).build();
+ assertEquals("MessageBundleTest1.properties", x2.getString("file"));
+ assertEquals("bar", x2.getString("yyy"));
+ }
+
+ @Test void a07_nonExistentMessage() {
+ var x = Messages.create(MessageBundleTest1.class).name("Bad").parent(Messages.of(Test2.class)).build();
+ assertEquals("{!bad}", x.getString("bad"));
+ }
+
+ @Test void a08_nonExistentMessage() {
+ var x = Messages.create(MessageBundleTest1.class).name("Bad").parent(Messages.of(Test2.class)).build();
+ assertEquals("{!bad}", x.getString("bad"));
+ }
+
+ @Test void a09_keySet_prefix() {
+ var x = Messages.of(MessageBundleTest1.class);
+ assertList(new TreeSet<>(x.keySet("xx")), "xx", "xx.", "xx.foo");
+ }
+
+ @Test void a10_getString() {
+ var x = Messages.of(MessageBundleTest1.class);
+ assertEquals("foo bar", x.getString("foo","bar"));
+ assertEquals("bar bar", x.getString("bar","bar"));
+ assertEquals("{!baz}", x.getString("baz","bar"));
+ assertEquals("fooja bar", x.forLocale(JAPAN).getString("foo","bar"));
+ assertEquals("foo bar", x.forLocale(CHINA).getString("foo","bar"));
+ assertEquals("foo bar", x.forLocale(null).getString("foo","bar"));
+ assertEquals("baz", x.forLocale(JAPAN).getString("baz"));
+ assertEquals("{!baz}", x.forLocale(CHINA).getString("baz"));
+ assertEquals("{!baz}", x.forLocale(null).getString("baz"));
+ }
+
+ @Test void a11_findFirstString() {
+ var x = Messages.of(MessageBundleTest1.class);
+ assertEquals("foo {0}", x.findFirstString("baz","foo"));
+ assertNull(x.findFirstString("baz","baz"));
+ assertEquals("baz", x.forLocale(JAPAN).findFirstString("baz","foo"));
+ assertNull(x.forLocale(CHINA).findFirstString("baz","baz"));
+ assertNull(x.forLocale(null).findFirstString("baz","baz"));
+ }
+
+ @Test void a12_getKeys() {
+ var x = Messages.of(Test2.class);
+ assertList(x.getKeys(), "file", "yyy");
+ }
+
+ @Test void a13_toString() {
+ var x = Messages.of(Test2.class);
+ assertString("{file=Test2.properties,yyy=bar}", x);
+ }
+}
\ No newline at end of file
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/AClass.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/cp/sub/FileFinder_Test2.java
similarity index 86%
copy from juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/AClass.java
copy to juneau-core/juneau-marshall/src/test/java/org/apache/juneau/cp/sub/FileFinder_Test2.java
index 5e1556c49e..569678ff06 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/AClass.java
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/cp/sub/FileFinder_Test2.java
@@ -14,6 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.juneau.commons.reflect;
+package org.apache.juneau.cp.sub;
-public class AClass {}
\ No newline at end of file
+import org.apache.juneau.cp.*;
+
+public class FileFinder_Test2 extends FileFinder_Test {}
\ No newline at end of file
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/AInterface.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/cp/test3/MessageBundleTest1.java
similarity index 91%
rename from juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/AInterface.java
rename to juneau-core/juneau-marshall/src/test/java/org/apache/juneau/cp/test3/MessageBundleTest1.java
index 283aec21e4..195bce62df 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/AInterface.java
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/cp/test3/MessageBundleTest1.java
@@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.juneau.commons.reflect;
+package org.apache.juneau.cp.test3;
-public interface AInterface {}
\ No newline at end of file
+public class MessageBundleTest1 {
+}
\ No newline at end of file
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/AClass.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/cp/test3/Test1.java
similarity index 92%
copy from juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/AClass.java
copy to juneau-core/juneau-marshall/src/test/java/org/apache/juneau/cp/test3/Test1.java
index 5e1556c49e..15d521b6c8 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/AClass.java
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/cp/test3/Test1.java
@@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.juneau.commons.reflect;
+package org.apache.juneau.cp.test3;
-public class AClass {}
\ No newline at end of file
+public class Test1 {
+}
\ No newline at end of file
diff --git a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/AClass.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/cp/test4/Test2.java
similarity index 87%
copy from juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/AClass.java
copy to juneau-core/juneau-marshall/src/test/java/org/apache/juneau/cp/test4/Test2.java
index 5e1556c49e..53efc55c17 100644
--- a/juneau-core/juneau-commons/src/test/java/org/apache/juneau/commons/reflect/AClass.java
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/cp/test4/Test2.java
@@ -14,6 +14,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.juneau.commons.reflect;
+package org.apache.juneau.cp.test4;
-public class AClass {}
\ No newline at end of file
+import org.apache.juneau.cp.test3.*;
+
+public class Test2 extends Test1 {
+}
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/ClassMeta_Test.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/ClassMeta_Test.java
index 6a23e7f0a1..00788b9476 100755
--- a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/ClassMeta_Test.java
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/ClassMeta_Test.java
@@ -292,6 +292,7 @@ class ClassMeta_Test extends TestBase {
@A(2) interface CI2 extends CI1 {}
@A(3) interface CI3 {}
@A(4) interface CI4 {}
+ @SuppressWarnings("unused") // Explicit interface listed for documentation clarity even though already inherited via CI2.
@A(5) static class C1 implements CI1, CI2 {}
@A(6) static class C2 extends C1 implements CI3 {}
@A(7) static class C3 extends C2 {}
diff --git a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/MarshalledPropertyPostProcessor_Test.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/MarshalledPropertyPostProcessor_Test.java
index 672304ad11..37e77215ec 100644
--- a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/MarshalledPropertyPostProcessor_Test.java
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/MarshalledPropertyPostProcessor_Test.java
@@ -492,7 +492,9 @@ class MarshalledPropertyPostProcessor_Test {
// Helpers
//------------------------------------------------------------------------------------------------------------------
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({
+ "unchecked" // Unchecked cast required for generic test utility.
+ })
private static <T> T roundTripDefault(T bean, String propertyName, Object value) {
// Reflectively set the property so the helper stays generic across the per-type fixture classes.
try {
diff --git a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/bson/BsonInputStream_Test.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/bson/BsonInputStream_Test.java
index 5543519f45..53cf20b03e 100644
--- a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/bson/BsonInputStream_Test.java
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/bson/BsonInputStream_Test.java
@@ -31,7 +31,10 @@ import org.junit.jupiter.api.*;
/**
* Tests for {@link BsonInputStream}.
*/
-@SuppressWarnings({"resource"})
+@SuppressWarnings({
+ "resource", // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+ "java:S125" // Commented-out code is retained as historical reference / future re-enable candidate.
+})
class BsonInputStream_Test extends TestBase {
// ====================================================================
@@ -228,6 +231,7 @@ class BsonInputStream_Test extends TestBase {
}
@Test
+ @SuppressWarnings("java:S2699") // Test verifies no exception is thrown; assertDoesNotThrow wraps are implicit.
void b14_readDocumentTerminator_ok() throws Exception {
try (var is = openIs(new byte[]{0x00})) {
is.readDocumentTerminator();
@@ -759,7 +763,7 @@ class BsonInputStream_Test extends TestBase {
// "l": int64(99999999999L)
elements.add(cat(new byte[]{0x12}, cstring("l"), le8(99999999999L)));
- var bodyParts = new ArrayList<byte[]>(elements);
+ var bodyParts = new ArrayList<>(elements);
bodyParts.add(new byte[]{0x00}); // terminator
var body = cat(bodyParts.toArray(new byte[0][]));
var doc = cat(le4(body.length + 4), body);
diff --git a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/cbor/CborParserSession_Test.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/cbor/CborParserSession_Test.java
index c1ac60e6df..c16c26a4a8 100644
--- a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/cbor/CborParserSession_Test.java
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/cbor/CborParserSession_Test.java
@@ -34,6 +34,10 @@ import org.junit.jupiter.api.*;
* float decoding, scalar conversion, type-mismatch error paths, proxy-bean
* MAP loading, undefined/simple markers, and array/collection variants.
*/
+@SuppressWarnings({
+ "unused", // Exception parameter intentionally unused in catch block; only the fact of the exception matters.
+ "java:S125" // Commented-out code is retained as historical reference / future re-enable candidate.
+})
class CborParserSession_Test extends TestBase {
//------------------------------------------------------------------------------------------------
@@ -66,9 +70,8 @@ class CborParserSession_Test extends TestBase {
@Test
void a04_tag22_base64() throws Exception {
// 0xD6 (tag 22) + text string "AAEC" (4 bytes -> 0x64) -- base64 encoded data
- var b = fromHex("D6644141454325"); // "AAEC%" trailing garbage? Use shorter clean
- // Re-do: just tag22 + "AAEC" length 4 = 0x64 + 41 41 45 43
- b = fromHex("D6644141 45 43".replace(" ", ""));
+ // tag22 + "AAEC" length 4 = 0x64 + 41 41 45 43
+ var b = fromHex("D6644141 45 43".replace(" ", ""));
assertEquals("AAEC", CborParser.DEFAULT.parse(b, String.class));
}
@@ -192,28 +195,28 @@ class CborParserSession_Test extends TestBase {
}
@Test
- void e01_beanFromArrayThrows() throws Exception {
+ void e01_beanFromArrayThrows() {
// Bean expects MAP; give it an ARRAY (0x80 = empty array).
var b = fromHex("80");
assertThrows(ParseException.class, () -> CborParser.DEFAULT.parse(b, SimpleBean.class));
}
@Test
- void e02_mapFromArrayThrows() throws Exception {
+ void e02_mapFromArrayThrows() {
// Map expects MAP; give it an ARRAY.
var b = fromHex("80");
assertThrows(ParseException.class, () -> CborParser.DEFAULT.parse(b, HashMap.class));
}
@Test
- void e03_collectionFromIntegerThrows() throws Exception {
+ void e03_collectionFromIntegerThrows() {
// Collection expects MAP or ARRAY; give it an integer.
var b = fromHex("01");
assertThrows(ParseException.class, () -> CborParser.DEFAULT.parse(b, ArrayList.class));
}
@Test
- void e04_arrayFromIntegerThrows() throws Exception {
+ void e04_arrayFromIntegerThrows() {
// int[] expects MAP or ARRAY; give it an integer.
var b = fromHex("01");
assertThrows(ParseException.class, () -> CborParser.DEFAULT.parse(b, int[].class));
@@ -249,6 +252,9 @@ class CborParserSession_Test extends TestBase {
}
@Test
+ @SuppressWarnings({
+ "java:S2699" // Test verifies no exception is thrown; assertDoesNotThrow wraps are implicit.
+ })
void f04_collectionFromMap() throws Exception {
// Collection target with MAP input -> falls into line 219, then cast(m, ...).
// Use a MAP that contains a _type discriminator so cast succeeds and returns a list.
@@ -263,6 +269,9 @@ class CborParserSession_Test extends TestBase {
}
@Test
+ @SuppressWarnings({
+ "java:S2699" // Test verifies no exception is thrown; assertDoesNotThrow wraps are implicit.
+ })
void f05_arrayFromMap() throws Exception {
// Object[] target with MAP input -> exercises line 233 array branch with MAP input.
var b = fromHex("A1616B01");
@@ -356,7 +365,7 @@ class CborParserSession_Test extends TestBase {
}
@Test
- void k02_indefiniteArrayThrows() throws Exception {
+ void k02_indefiniteArrayThrows() {
// 0x9F = indefinite-length array marker. Spec stop-byte is 0xFF.
// Per CborInputStream.readArgument, additionalInfo==31 throws "not supported".
var b = fromHex("9F0102FF");
diff --git a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/collections/JsonList_Test.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/collections/JsonList_Test.java
new file mode 100644
index 0000000000..3e612c8abe
--- /dev/null
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/collections/JsonList_Test.java
@@ -0,0 +1,289 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.juneau.marshall.collections;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+import java.io.*;
+import java.util.*;
+import java.util.function.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.marshall.json.*;
+import org.junit.jupiter.api.*;
+
+class JsonList_Test extends TestBase {
+
+ @Test void a01_create() {
+ var l = JsonList.create();
+ assertNotNull(l);
+ assertTrue(l.isEmpty());
+ }
+
+ @Test void a02_ofValues() {
+ var l = JsonList.of("a", 1, true);
+ assertEquals(3, l.size());
+ assertEquals("a", l.getString(0));
+ assertEquals(1, l.getInt(1));
+ assertTrue(l.getBoolean(2));
+ }
+
+ @Test void a03_ofCollection() {
+ var src = Arrays.asList(1, 2, 3);
+ var l = JsonList.of(src);
+ assertEquals(3, l.size());
+ assertEquals(1, l.getInt(0));
+ }
+
+ @Test void a04_ofCollectionNull() {
+ assertNull(JsonList.of((Collection<?>) null));
+ }
+
+ @Test void a05_ofStringCharSequence() throws Exception {
+ var l = JsonList.ofString("[1,2,3]");
+ assertEquals(3, l.size());
+ assertEquals(1, l.getInt(0));
+ assertEquals(2, l.getInt(1));
+ assertEquals(3, l.getInt(2));
+ }
+
+ @Test void a06_ofStringCharSequenceNull() throws Exception {
+ var l = JsonList.ofString((CharSequence) null);
+ assertNotNull(l);
+ assertTrue(l.isEmpty());
+ }
+
+ @Test void a07_ofStringReader() throws Exception {
+ var l = JsonList.ofString(new StringReader("[10,20]"));
+ assertEquals(2, l.size());
+ assertEquals(10, l.getInt(0));
+ }
+
+ @Test void a08_ofStringReaderNull() throws Exception {
+ var l = JsonList.ofString((Reader) null);
+ assertNotNull(l);
+ assertTrue(l.isEmpty());
+ }
+
+ @Test void a09_ofStringWithParser() throws Exception {
+ var l = JsonList.ofString("[1,2]", JsonParser.DEFAULT);
+ assertEquals(2, l.size());
+ }
+
+ @Test void a10_toStringProducesJson() {
+ var l = JsonList.of(1, 2, 3);
+ assertEquals("[1,2,3]", l.toString());
+ }
+
+ @Test void a11_toJson() {
+ var l = JsonList.of("a", "b");
+ assertEquals("[\"a\",\"b\"]", l.toJson());
+ }
+
+ @Test void a12_toJson5() {
+ var l = JsonList.of("a", "b");
+ assertEquals("['a','b']", l.toJson5());
+ }
+
+ @Test void a13_appendFluent() {
+ var l = JsonList.create().append("a").append(1).append(true);
+ assertEquals(3, l.size());
+ assertEquals("a", l.getString(0));
+ assertEquals(1, l.getInt(1));
+ assertTrue(l.getBoolean(2));
+ }
+
+ @Test void a14_appendVarargs() {
+ var l = JsonList.create().append("a", "b", "c");
+ assertEquals(3, l.size());
+ }
+
+ @Test void a15_appendIfTrue() {
+ var l = JsonList.create().appendIf(true, "yes").appendIf(false, "no");
+ assertEquals(1, l.size());
+ assertEquals("yes", l.getString(0));
+ }
+
+ @Test void a16_appendReverse() {
+ var l = JsonList.create().appendReverse("a", "b", "c");
+ assertEquals(3, l.size());
+ assertEquals("c", l.getString(0));
+ assertEquals("b", l.getString(1));
+ assertEquals("a", l.getString(2));
+ }
+
+ @Test void a17_appendReverseList() {
+ var l = JsonList.create().appendReverse(Arrays.asList("x", "y"));
+ assertEquals(2, l.size());
+ assertEquals("y", l.getString(0));
+ assertEquals("x", l.getString(1));
+ }
+
+ @Test void a18_appendCollection() {
+ var l = JsonList.create().append(Arrays.asList(1, 2, 3));
+ assertEquals(3, l.size());
+ }
+
+ @Test void a19_typedAccessors() {
+ var l = JsonList.of("42", "true", "9999999999", 123);
+ assertEquals(42, l.getInt(0));
+ assertTrue(l.getBoolean(1));
+ assertEquals(9999999999L, l.getLong(2));
+ assertEquals("123", l.getString(3));
+ }
+
+ @Test void a20_getMap() {
+ var map = JsonMap.of("a", 1);
+ var l = JsonList.of(map);
+ var got = l.getMap(0);
+ assertEquals(1, got.getInt("a"));
+ }
+
+ @Test void a21_getList() {
+ var inner = JsonList.of(1, 2);
+ var l = JsonList.create().append((Object) inner);
+ var got = l.getList(0);
+ assertEquals(2, got.size());
+ }
+
+ @SuppressWarnings({"java:S5961", // Test comprehensiveness requires more than 25 assertions.
+ "java:S5778" // assertThrows lambdas contain multiple calls; only the collection-mutating call throws in practice.
+ })
+ @Test void a22_unmodifiable() {
+ var l = JsonList.of(1, 2, 3).unmodifiable();
+ assertTrue(l.isUnmodifiable());
+ assertThrows(UnsupportedOperationException.class, () -> l.add(0, 4));
+ assertThrows(UnsupportedOperationException.class, () -> l.add(4));
+ assertThrows(UnsupportedOperationException.class, () -> l.remove(0));
+ assertThrows(UnsupportedOperationException.class, () -> l.remove(Integer.valueOf(1)));
+ assertThrows(UnsupportedOperationException.class, () -> l.set(0, 9));
+ assertThrows(UnsupportedOperationException.class, () -> l.addAll(Arrays.asList(4, 5)));
+ assertThrows(UnsupportedOperationException.class, () -> l.addAll(0, Arrays.asList(4, 5)));
+ assertThrows(UnsupportedOperationException.class, () -> l.removeAll(Arrays.asList(1)));
+ assertThrows(UnsupportedOperationException.class, () -> l.retainAll(Arrays.asList(1)));
+ assertThrows(UnsupportedOperationException.class, l::clear);
+ assertThrows(UnsupportedOperationException.class, () -> l.addFirst(0));
+ assertThrows(UnsupportedOperationException.class, () -> l.addLast(4));
+ assertThrows(UnsupportedOperationException.class, l::removeFirst);
+ assertThrows(UnsupportedOperationException.class, l::removeLast);
+ assertThrows(UnsupportedOperationException.class, () -> l.removeFirstOccurrence(1));
+ assertThrows(UnsupportedOperationException.class, () -> l.removeLastOccurrence(3));
+ assertThrows(UnsupportedOperationException.class, () -> l.offer(4));
+ assertThrows(UnsupportedOperationException.class, () -> l.offerFirst(0));
+ assertThrows(UnsupportedOperationException.class, () -> l.offerLast(4));
+ assertThrows(UnsupportedOperationException.class, l::poll);
+ assertThrows(UnsupportedOperationException.class, l::pollFirst);
+ assertThrows(UnsupportedOperationException.class, l::pollLast);
+ assertThrows(UnsupportedOperationException.class, l::pop);
+ assertThrows(UnsupportedOperationException.class, () -> l.push(0));
+ assertThrows(UnsupportedOperationException.class, () -> l.removeIf(x -> true));
+ assertThrows(UnsupportedOperationException.class, () -> l.replaceAll(UnaryOperator.identity()));
+ assertThrows(UnsupportedOperationException.class, () -> l.sort(null));
+ assertThrows(UnsupportedOperationException.class, l::removeFirst);
+ assertThrows(UnsupportedOperationException.class, () -> {
+ var it = l.iterator();
+ it.next();
+ it.remove();
+ });
+ assertThrows(UnsupportedOperationException.class, () -> {
+ var it = l.listIterator();
+ it.next();
+ it.remove();
+ });
+ assertThrows(UnsupportedOperationException.class, () -> {
+ var it = l.listIterator();
+ it.add(99);
+ });
+ assertThrows(UnsupportedOperationException.class, () -> {
+ var it = l.listIterator();
+ it.next();
+ it.set(99);
+ });
+ assertEquals(3, l.size());
+ }
+
+ @Test void a23_modifiable() {
+ var l = JsonList.of(1, 2).unmodifiable().modifiable();
+ assertFalse(l.isUnmodifiable());
+ l.add(3);
+ assertEquals(3, l.size());
+ }
+
+ @Test void a24_emptyListConstant() {
+ assertTrue(JsonList.EMPTY_LIST.isEmpty());
+ assertThrows(UnsupportedOperationException.class, () -> JsonList.EMPTY_LIST.add(0, "x"));
+ }
+
+ @Test void a25_ofArrays() {
+ var l = JsonList.ofArrays(new Object[]{1, 2}, new Object[]{3, 4});
+ assertEquals(2, l.size());
+ }
+
+ @Test void a26_ofCollections() {
+ var l = JsonList.ofCollections(Arrays.asList(1, 2), Arrays.asList(3, 4));
+ assertEquals(2, l.size());
+ }
+
+ @Test void a27_ofJsonOrCdl_json() throws Exception {
+ var l = JsonList.ofJsonOrCdl("[1,2,3]");
+ assertEquals(3, l.size());
+ assertEquals(1, l.getInt(0));
+ }
+
+ @Test void a28_ofJsonOrCdl_cdl() throws Exception {
+ var l = JsonList.ofJsonOrCdl("a,b,c");
+ assertEquals(3, l.size());
+ assertEquals("a", l.getString(0));
+ assertEquals("b", l.getString(1));
+ assertEquals("c", l.getString(2));
+ }
+
+ @Test void a29_ofJsonOrCdl_null() throws Exception {
+ var l = JsonList.ofJsonOrCdl(null);
+ assertNotNull(l);
+ assertTrue(l.isEmpty());
+ }
+
+ @Test void a30_ofJsonOrCdl_empty() throws Exception {
+ var l = JsonList.ofJsonOrCdl("");
+ assertNotNull(l);
+ assertTrue(l.isEmpty());
+ }
+
+ @Test void a31_elements() {
+ var l = JsonList.of("1", "2", "3");
+ var count = 0;
+ for (var s : l.elements(String.class)) {
+ assertNotNull(s);
+ count++;
+ }
+ assertEquals(3, count);
+ }
+
+ @Test void a32_writeTo() throws Exception {
+ var l = JsonList.of(1, 2);
+ var sw = new StringWriter();
+ l.writeTo(sw);
+ assertEquals("[1,2]", sw.toString());
+ }
+
+ @Test void a33_toStringWithSerializer() {
+ var l = JsonList.of(1, 2);
+ var s = l.toString(JsonSerializer.DEFAULT);
+ assertEquals("[1,2]", s);
+ }
+}
diff --git a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/collections/JsonMap_Test.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/collections/JsonMap_Test.java
new file mode 100644
index 0000000000..faead89c84
--- /dev/null
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/collections/JsonMap_Test.java
@@ -0,0 +1,317 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.juneau.marshall.collections;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+import java.io.*;
+import java.util.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.marshall.json.*;
+import org.junit.jupiter.api.*;
+
+class JsonMap_Test extends TestBase {
+
+ @Test void a01_create() {
+ var m = JsonMap.create();
+ assertNotNull(m);
+ assertTrue(m.isEmpty());
+ }
+
+ @Test void a02_ofKeyValuePairs() {
+ var m = JsonMap.of("a", 1, "b", "two");
+ assertEquals(2, m.size());
+ assertEquals(1, m.getInt("a"));
+ assertEquals("two", m.getString("b"));
+ }
+
+ @Test void a03_ofMap() {
+ var src = new LinkedHashMap<String,Object>();
+ src.put("x", 10);
+ var m = JsonMap.of(src);
+ assertEquals(10, m.getInt("x"));
+ }
+
+ @Test void a04_ofMapNull() {
+ assertNull(JsonMap.of((Map<?,?>) null));
+ }
+
+ @Test void a05_ofStringCharSequence() throws Exception {
+ var m = JsonMap.ofString("{\"a\":1,\"b\":\"two\"}");
+ assertEquals(1, m.getInt("a"));
+ assertEquals("two", m.getString("b"));
+ }
+
+ @Test void a06_ofStringCharSequenceNull() throws Exception {
+ var m = JsonMap.ofString((CharSequence) null);
+ assertNotNull(m);
+ assertTrue(m.isEmpty());
+ }
+
+ @Test void a07_ofStringReader() throws Exception {
+ var m = JsonMap.ofString(new StringReader("{\"x\":99}"));
+ assertEquals(99, m.getInt("x"));
+ }
+
+ @Test void a08_ofStringReaderNull() throws Exception {
+ var m = JsonMap.ofString((Reader) null);
+ assertNotNull(m);
+ assertTrue(m.isEmpty());
+ }
+
+ @Test void a09_ofStringWithParser() throws Exception {
+ var m = JsonMap.ofString("{\"k\":\"v\"}", JsonParser.DEFAULT);
+ assertEquals("v", m.getString("k"));
+ }
+
+ @Test void a10_toStringProducesJson() {
+ var m = JsonMap.of("a", 1);
+ assertEquals("{\"a\":1}", m.toString());
+ }
+
+ @Test void a11_toJson() {
+ var m = JsonMap.of("a", 1);
+ assertEquals("{\"a\":1}", m.toJson());
+ }
+
+ @Test void a12_toJson5() {
+ var m = JsonMap.of("a", 1);
+ assertEquals("{a:1}", m.toJson5());
+ }
+
+ @Test void a13_appendFluent() {
+ var m = JsonMap.create().append("a", 1).append("b", 2);
+ assertEquals(2, m.size());
+ assertEquals(1, m.getInt("a"));
+ assertEquals(2, m.getInt("b"));
+ }
+
+ @Test void a14_appendIfTrue() {
+ var m = JsonMap.create().appendIf(true, "a", 1).appendIf(false, "b", 2);
+ assertEquals(1, m.size());
+ assertTrue(m.containsKey("a"));
+ assertFalse(m.containsKey("b"));
+ }
+
+ @Test void a15_appendIfAbsent() {
+ var m = JsonMap.of("a", 1).appendIfAbsent("a", 99).appendIfAbsent("b", 2);
+ assertEquals(1, m.getInt("a"));
+ assertEquals(2, m.getInt("b"));
+ }
+
+ @Test void a16_typedAccessors() {
+ var m = JsonMap.of("i", "42", "b", "true", "l", "9999999999", "s", 123);
+ assertEquals(42, m.getInt("i"));
+ assertTrue(m.getBoolean("b"));
+ assertEquals(9999999999L, m.getLong("l"));
+ assertEquals("123", m.getString("s"));
+ }
+
+ @Test void a17_getIntWithDefault() {
+ var m = JsonMap.of("a", 5);
+ assertEquals(5, m.getInt("a", 0));
+ assertEquals(0, m.getInt("missing", 0));
+ }
+
+ @Test void a18_getBooleanWithDefault() {
+ var m = JsonMap.of("a", true);
+ assertTrue(m.getBoolean("a", false));
+ assertFalse(m.getBoolean("missing", false));
+ }
+
+ @Test void a19_getLongWithDefault() {
+ var m = JsonMap.of("a", 100L);
+ assertEquals(100L, m.getLong("a", 0L));
+ assertEquals(0L, m.getLong("missing", 0L));
+ }
+
+ @Test void a20_getMapNested() {
+ var inner = JsonMap.of("x", 1);
+ var m = JsonMap.of("nested", inner);
+ var got = m.getMap("nested");
+ assertEquals(1, got.getInt("x"));
+ }
+
+ @Test void a21_getMapCreateIfNotExists() {
+ var m = JsonMap.create();
+ var nested = m.getMap("nested", true);
+ assertNotNull(nested);
+ assertSame(nested, m.getMap("nested"));
+ }
+
+ @Test void a22_getListNested() {
+ var inner = JsonList.of(1, 2, 3);
+ var m = JsonMap.of("arr", inner);
+ var got = m.getList("arr");
+ assertEquals(3, got.size());
+ }
+
+ @Test void a23_getListCreateIfNotExists() {
+ var m = JsonMap.create();
+ var list = m.getList("items", true);
+ assertNotNull(list);
+ assertSame(list, m.getList("items"));
+ }
+
+ @Test void a24_exclude() {
+ var m = JsonMap.of("a", 1, "b", 2, "c", 3);
+ var excluded = m.exclude("b");
+ assertEquals(2, excluded.size());
+ assertFalse(excluded.containsKey("b"));
+ }
+
+ @Test void a25_include() {
+ var m = JsonMap.of("a", 1, "b", 2, "c", 3);
+ var included = m.include("a", "c");
+ assertEquals(2, included.size());
+ assertTrue(included.containsKey("a"));
+ assertTrue(included.containsKey("c"));
+ }
+
+ @SuppressWarnings({
+ "java:S5778" // assertThrows lambdas contain multiple calls; only the primary call throws.
+ })
+ @Test void a26_unmodifiable() {
+ var m = JsonMap.of("a", 1).unmodifiable();
+ assertTrue(m.isUnmodifiable());
+ assertThrows(UnsupportedOperationException.class, () -> m.put("b", 2));
+ assertThrows(UnsupportedOperationException.class, () -> m.remove("a"));
+ assertThrows(UnsupportedOperationException.class, () -> m.putAll(Collections.singletonMap("c", 3)));
+ assertThrows(UnsupportedOperationException.class, m::clear);
+ assertThrows(UnsupportedOperationException.class, () -> m.putIfAbsent("d", 4));
+ assertThrows(UnsupportedOperationException.class, () -> m.remove("a", 1));
+ assertThrows(UnsupportedOperationException.class, () -> m.replace("a", 99));
+ assertThrows(UnsupportedOperationException.class, () -> m.replace("a", 1, 99));
+ assertThrows(UnsupportedOperationException.class, () -> m.replaceAll((k, v) -> v));
+ assertThrows(UnsupportedOperationException.class, () -> m.compute("a", (k, v) -> 0));
+ assertThrows(UnsupportedOperationException.class, () -> m.computeIfAbsent("e", k -> 0));
+ assertThrows(UnsupportedOperationException.class, () -> m.computeIfPresent("a", (k, v) -> 0));
+ assertThrows(UnsupportedOperationException.class, () -> m.merge("a", 5, (v1, v2) -> v2));
+ assertThrows(UnsupportedOperationException.class, () -> {
+ var it = m.entrySet().iterator();
+ it.next();
+ it.remove();
+ });
+ assertThrows(UnsupportedOperationException.class, () -> {
+ var it = m.keySet().iterator();
+ it.next();
+ it.remove();
+ });
+ assertThrows(UnsupportedOperationException.class, () -> {
+ var it = m.values().iterator();
+ it.next();
+ it.remove();
+ });
+ assertEquals(1, m.size());
+ }
+
+ @Test void a27_modifiable() {
+ var m = JsonMap.of("a", 1).unmodifiable().modifiable();
+ assertFalse(m.isUnmodifiable());
+ m.put("b", 2);
+ assertEquals(2, m.size());
+ }
+
+ @Test void a28_inner() {
+ var inner = JsonMap.of("a", 1);
+ var outer = JsonMap.of("b", 2).inner(inner);
+ assertEquals(1, outer.getInt("a"));
+ assertEquals(2, outer.getInt("b"));
+ }
+
+ @Test void a29_filtered() {
+ var m = JsonMap.create().filtered().append("a", null).append("b", 2);
+ assertEquals(1, m.size());
+ assertFalse(m.containsKey("a"));
+ assertTrue(m.containsKey("b"));
+ }
+
+ @Test void a30_findString() {
+ var m = JsonMap.of("alt", "value");
+ assertEquals("value", m.findString("primary", "alt"));
+ }
+
+ @Test void a31_findMap() {
+ var nested = JsonMap.of("x", 1);
+ var m = JsonMap.of("nested", nested);
+ var found = m.findMap("missing", "nested");
+ assertEquals(1, found.getInt("x"));
+ }
+
+ @Test void a32_findList() {
+ var list = JsonList.of(1, 2);
+ var m = JsonMap.of("arr", list);
+ var found = m.findList("missing", "arr");
+ assertEquals(2, found.size());
+ }
+
+ @Test void a33_emptyMapConstant() {
+ assertTrue(JsonMap.EMPTY_MAP.isEmpty());
+ assertThrows(UnsupportedOperationException.class, () -> JsonMap.EMPTY_MAP.put("x", 1));
+ }
+
+ @Test void a34_putJson() throws Exception {
+ var m = JsonMap.create();
+ m.putJson("nested", "{\"a\":1}");
+ var nested = m.getMap("nested");
+ assertNotNull(nested);
+ assertEquals(1, nested.getInt("a"));
+ }
+
+ @Test void a35_filteredMap() {
+ var m = JsonMap.filteredMap("a", 1, "b", 2);
+ m.append("c", null);
+ assertEquals(2, m.size());
+ assertFalse(m.containsKey("c"));
+ assertEquals(1, m.getInt("a"));
+ assertEquals(2, m.getInt("b"));
+ }
+
+ @Test void a36_keepAll() {
+ var m = JsonMap.of("a", 1, "b", 2, "c", 3).keepAll("a", "c");
+ assertEquals(2, m.size());
+ assertTrue(m.containsKey("a"));
+ assertFalse(m.containsKey("b"));
+ assertTrue(m.containsKey("c"));
+ }
+
+ @Test void a37_getFirstKey() {
+ var m = JsonMap.of("first", 1, "second", 2);
+ assertEquals("first", m.getFirstKey());
+ }
+
+ @Test void a38_writeTo() throws Exception {
+ var m = JsonMap.of("a", 1);
+ var sw = new StringWriter();
+ m.writeTo(sw);
+ assertEquals("{\"a\":1}", sw.toString());
+ }
+
+ @Test void a39_appendMap() {
+ var extra = new LinkedHashMap<String,Object>();
+ extra.put("c", 3);
+ extra.put("d", 4);
+ var m = JsonMap.of("a", 1).append(extra);
+ assertEquals(3, m.size());
+ assertEquals(3, m.getInt("c"));
+ }
+
+ @Test void a40_oddKeyValuePairsThrows() {
+ assertThrows(IllegalArgumentException.class, () -> JsonMap.of("a", 1, "b"));
+ }
+}
diff --git a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/collections/MarshalledList_Test.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/collections/MarshalledList_Test.java
new file mode 100644
index 0000000000..8e70a43086
--- /dev/null
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/collections/MarshalledList_Test.java
@@ -0,0 +1,213 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.juneau.marshall.collections;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+import java.util.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.marshall.json5.*;
+import org.junit.jupiter.api.*;
+
+/**
+ * Smoke tests for the marshaller-neutral {@link MarshalledList} base class.
+ *
+ * <p>
+ * These tests exercise the neutral base directly to confirm that:
+ * <ul>
+ * <li>{@link MarshalledList#toString()} produces the inherited {@link LinkedList} form (not JSON).
+ * <li>{@link MarshalledList#getMap} / {@link MarshalledList#getList} return the neutral types.
+ * <li>Construction via the parser-required ctors works.
+ * </ul>
+ */
+@SuppressWarnings({
+ "java:S5778", // Lambda intentionally calls multiple throwing methods to test compound failure scenarios.
+ "java:S5961" // High assertion count is acceptable in comprehensive data-driven test methods.
+})
+class MarshalledList_Test extends TestBase {
+
+ @Test void a01_emptyToString() {
+ var l = new MarshalledList();
+ assertEquals("[]", l.toString());
+ }
+
+ @Test void a02_toStringIsLinkedListForm() {
+ var l = new MarshalledList(1, "two", true);
+ // LinkedList-style output, NOT JSON5.
+ assertEquals("[1, two, true]", l.toString());
+ }
+
+ @Test void a03_factoryOf() {
+ var l = MarshalledList.of(1, 2, 3);
+ assertEquals(3, l.size());
+ assertEquals(1, l.getInt(0));
+ assertEquals(2, l.getInt(1));
+ assertEquals(3, l.getInt(2));
+ }
+
+ @Test void a04_factoryCreateAndAppend() {
+ var l = MarshalledList.create().append("a").append("b");
+ assertEquals(2, l.size());
+ assertEquals("a", l.getString(0));
+ }
+
+ @Test void a05_parseViaOfString() throws Exception {
+ var l = MarshalledList.ofString("[1,2,3]", Json5Parser.DEFAULT);
+ assertNotNull(l);
+ assertEquals(3, l.size());
+ assertEquals(2, l.getInt(1));
+ }
+
+ @Test void a06_parseViaOfStringNullInput() throws Exception {
+ var l = MarshalledList.ofString((CharSequence)null, Json5Parser.DEFAULT);
+ assertNotNull(l);
+ assertTrue(l.isEmpty());
+ assertEquals(MarshalledList.class, l.getClass());
+ l.add("x");
+ assertEquals(1, l.size());
+ }
+
+ @Test void a06c_parseViaOfStringNullReader() throws Exception {
+ var l = MarshalledList.ofString((java.io.Reader)null, Json5Parser.DEFAULT);
+ assertNotNull(l);
+ assertTrue(l.isEmpty());
+ assertEquals(MarshalledList.class, l.getClass());
+ l.add("x");
+ assertEquals(1, l.size());
+ }
+
+ @Test void a06b_ofTextAliasStillWorks() throws Exception {
+ var l = MarshalledList.ofString("[1,2,3]", Json5Parser.DEFAULT);
+ assertNotNull(l);
+ assertEquals(3, l.size());
+ }
+
+ @Test void a07_getMapReturnsNeutralType() {
+ var nested = new MarshalledMap("x", 1);
+ var l = MarshalledList.of(nested);
+ var m = l.getMap(0);
+ assertFalse(m instanceof JsonMap, "Stored MarshalledMap should not be returned as a JsonMap");
+ assertEquals(1, m.getInt("x"));
+ }
+
+ @Test void a08_getListReturnsNeutralType() {
+ var inner = MarshalledList.of(1, 2);
+ // Use add() (inherited from LinkedList) to add inner as a single element rather than flattening it.
+ var l = new MarshalledList();
+ l.add(inner);
+ var nested = l.getList(0);
+ assertFalse(nested instanceof JsonList, "Stored MarshalledList should not be returned as a JsonList");
+ assertEquals(2, nested.size());
+ }
+
+ @Test void a09_typedAccessors() {
+ var l = MarshalledList.of("42", "true", "9999999999", 123);
+ assertEquals(42, l.getInt(0));
+ assertTrue(l.getBoolean(1));
+ assertEquals(9999999999L, l.getLong(2));
+ assertEquals("123", l.getString(3));
+ }
+
+ @Test void a10_appendReverse() {
+ var l = MarshalledList.create().appendReverse("a", "b", "c");
+ assertEquals("c", l.getString(0));
+ assertEquals("a", l.getString(2));
+ }
+
+ @Test void a11_unmodifiable() {
+ var l = MarshalledList.of("a", "b", "c").unmodifiable();
+ assertTrue(l.isUnmodifiable());
+ assertThrows(UnsupportedOperationException.class, () -> l.add(0, "x"));
+ assertThrows(UnsupportedOperationException.class, () -> l.add("x"));
+ assertThrows(UnsupportedOperationException.class, () -> l.remove(0));
+ assertThrows(UnsupportedOperationException.class, () -> l.remove("a"));
+ assertThrows(UnsupportedOperationException.class, () -> l.set(0, "x"));
+ assertThrows(UnsupportedOperationException.class, () -> l.addAll(List.of("x")));
+ assertThrows(UnsupportedOperationException.class, () -> l.addAll(0, List.of("x")));
+ assertThrows(UnsupportedOperationException.class, () -> l.removeAll(List.of("a")));
+ assertThrows(UnsupportedOperationException.class, () -> l.retainAll(List.of("a")));
+ assertThrows(UnsupportedOperationException.class, l::clear);
+ assertThrows(UnsupportedOperationException.class, () -> l.addFirst("x"));
+ assertThrows(UnsupportedOperationException.class, () -> l.addLast("x"));
+ assertThrows(UnsupportedOperationException.class, l::removeFirst);
+ assertThrows(UnsupportedOperationException.class, l::removeLast);
+ assertThrows(UnsupportedOperationException.class, () -> l.removeFirstOccurrence("a"));
+ assertThrows(UnsupportedOperationException.class, () -> l.removeLastOccurrence("a"));
+ assertThrows(UnsupportedOperationException.class, () -> l.offer("x"));
+ assertThrows(UnsupportedOperationException.class, () -> l.offerFirst("x"));
+ assertThrows(UnsupportedOperationException.class, () -> l.offerLast("x"));
+ assertThrows(UnsupportedOperationException.class, l::poll);
+ assertThrows(UnsupportedOperationException.class, l::pollFirst);
+ assertThrows(UnsupportedOperationException.class, l::pollLast);
+ assertThrows(UnsupportedOperationException.class, l::pop);
+ assertThrows(UnsupportedOperationException.class, () -> l.push("x"));
+ assertThrows(UnsupportedOperationException.class, () -> l.removeIf(o -> true));
+ assertThrows(UnsupportedOperationException.class, () -> l.replaceAll(o -> "x"));
+ assertThrows(UnsupportedOperationException.class, () -> l.sort((a, b) -> 0));
+ var it = l.iterator();
+ it.next();
+ assertThrows(UnsupportedOperationException.class, it::remove);
+ var lit = l.listIterator();
+ lit.next();
+ assertThrows(UnsupportedOperationException.class, lit::remove);
+ assertThrows(UnsupportedOperationException.class, () -> lit.add("x"));
+ assertThrows(UnsupportedOperationException.class, () -> lit.set("x"));
+ assertEquals(3, l.size());
+ }
+
+ @Test void a12_modifiable() {
+ var ro = MarshalledList.of("a").unmodifiable();
+ var mod = ro.modifiable();
+ assertFalse(mod.isUnmodifiable());
+ // modifiable() returns a fresh copy that is itself modifiable.
+ mod.add("b");
+ assertEquals(2, mod.size());
+ }
+
+ @Test void a13_elementsIterableConvertsTypes() {
+ var l = MarshalledList.of("1", "2", "3");
+ var sum = 0;
+ for (Integer i : l.elements(Integer.class))
+ sum += i;
+ assertEquals(6, sum);
+ }
+
+ @Test void a14_emptyListConstant() {
+ assertTrue(MarshalledList.EMPTY_LIST.isEmpty());
+ assertThrows(UnsupportedOperationException.class, () -> MarshalledList.EMPTY_LIST.add(0, "x"));
+ }
+
+ @Test void a15_ofCollection() {
+ var l = MarshalledList.of(Arrays.asList("a", "b"));
+ assertEquals(2, l.size());
+ assertEquals("b", l.getString(1));
+ }
+
+ @Test void a16_ofArrays() {
+ var l = MarshalledList.ofArrays(new Object[]{1, 2}, new Object[]{3, 4});
+ assertEquals(2, l.size());
+ }
+
+ @Test void a17_appendIf() {
+ var l = MarshalledList.create()
+ .appendIf(true, "kept")
+ .appendIf(false, "skipped");
+ assertEquals(1, l.size());
+ assertEquals("kept", l.getString(0));
+ }
+}
diff --git a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/collections/MarshalledMap_Test.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/collections/MarshalledMap_Test.java
new file mode 100644
index 0000000000..3d696311d1
--- /dev/null
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/collections/MarshalledMap_Test.java
@@ -0,0 +1,777 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.juneau.marshall.collections;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+import java.util.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.marshall.*;
+import org.apache.juneau.marshall.json5.*;
+import org.junit.jupiter.api.*;
+
+/**
+ * Smoke tests for the marshaller-neutral {@link MarshalledMap} base class.
+ *
+ * <p>
+ * These tests exercise the neutral base directly to confirm that:
+ * <ul>
+ * <li>{@link MarshalledMap#toString()} produces the inherited {@link LinkedHashMap} form (not JSON).
+ * <li>{@link MarshalledMap#getMap} / {@link MarshalledMap#getList} return the neutral types.
+ * <li>Construction via the parser-required ctors works.
+ * <li>Bean conversion via {@link MarshalledMap#cast(Class)} still works.
+ * </ul>
+ */
+@SuppressWarnings({
+ "java:S5778" // Lambda intentionally calls multiple throwing methods to test compound failure scenarios.
+})
+class MarshalledMap_Test extends TestBase {
+
+ @Test void a01_emptyToString() {
+ var m = new MarshalledMap();
+ assertEquals("{}", m.toString());
+ }
+
+ @Test void a02_toStringIsLinkedHashMapForm() {
+ var m = new MarshalledMap("a", 1, "b", "two");
+ // LinkedHashMap-style output, NOT JSON5.
+ assertEquals("{a=1, b=two}", m.toString());
+ }
+
+ @Test void a03_factoryOf() {
+ var m = MarshalledMap.of("k1", "v1", "k2", 2);
+ assertEquals(2, m.size());
+ assertEquals("v1", m.getString("k1"));
+ assertEquals(2, m.getInt("k2"));
+ }
+
+ @Test void a04_factoryCreateAndAppend() {
+ var m = MarshalledMap.create().append("a", 1).append("b", 2);
+ assertEquals(2, m.size());
+ assertEquals(1, m.getInt("a"));
+ }
+
+ @Test void a05_parseViaOfString() throws Exception {
+ var m = MarshalledMap.ofString("{a:1,b:'two'}", Json5Parser.DEFAULT);
+ assertNotNull(m);
+ assertEquals(1, m.getInt("a"));
+ assertEquals("two", m.getString("b"));
+ }
+
+ @Test void a06_parseViaOfStringNullInput() throws Exception {
+ var m = MarshalledMap.ofString((CharSequence)null, Json5Parser.DEFAULT);
+ assertNotNull(m);
+ assertTrue(m.isEmpty());
+ assertEquals(MarshalledMap.class, m.getClass());
+ m.put("x", 1);
+ assertEquals(1, m.size());
+ }
+
+ @Test void a06c_parseViaOfStringNullReader() throws Exception {
+ var m = MarshalledMap.ofString((java.io.Reader)null, Json5Parser.DEFAULT);
+ assertNotNull(m);
+ assertTrue(m.isEmpty());
+ assertEquals(MarshalledMap.class, m.getClass());
+ m.put("x", 1);
+ assertEquals(1, m.size());
+ }
+
+ @Test void a06b_ofTextAliasStillWorks() throws Exception {
+ var m = MarshalledMap.ofString("{a:1}", Json5Parser.DEFAULT);
+ assertNotNull(m);
+ assertEquals(1, m.getInt("a"));
+ }
+
+ @Test void a07_getMapReturnsNeutralType() {
+ var nested = new MarshalledMap("x", 1);
+ var m = new MarshalledMap("nested", nested);
+ var got = m.getMap("nested");
+ assertFalse(got instanceof JsonMap, "Stored MarshalledMap should not be returned as a JsonMap");
+ assertEquals(1, got.getInt("x"));
+ }
+
+ @Test void a08_getListReturnsNeutralType() {
+ var list = MarshalledList.of(1, 2, 3);
+ var m = new MarshalledMap("arr", list);
+ var got = m.getList("arr");
+ assertFalse(got instanceof JsonList, "Stored MarshalledList should not be returned as a JsonList");
+ assertEquals(3, got.size());
+ }
+
+ @Test void a08b_parseProducesJson5MapInternally() throws Exception {
+ var m = MarshalledMap.ofString("{nested:{x:1}}", Json5Parser.DEFAULT);
+ var nested = m.getMap("nested");
+ assertTrue(nested instanceof Json5Map, "Json5Parser produces Json5Map for nested objects");
+ assertFalse(nested instanceof JsonMap, "Strict-JSON JsonMap is not used by Json5Parser");
+ }
+
+ @Test void a09_getMapCreateIfNotExists() {
+ var m = MarshalledMap.create();
+ var nested = m.getMap("nested", true);
+ assertNotNull(nested);
+ assertSame(nested, m.getMap("nested"));
+ }
+
+ @Test void a10_getListCreateIfNotExists() {
+ var m = MarshalledMap.create();
+ var list = m.getList("items", true);
+ assertNotNull(list);
+ assertSame(list, m.getList("items"));
+ }
+
+ @Test void a11_typedAccessors() {
+ var m = MarshalledMap.of("i", "42", "b", "true", "l", "9999999999", "s", 123);
+ assertEquals(42, m.getInt("i"));
+ assertTrue(m.getBoolean("b"));
+ assertEquals(9999999999L, m.getLong("l"));
+ assertEquals("123", m.getString("s"));
+ }
+
+ @Test void a12_filterAndExclude() {
+ var m = MarshalledMap.of("a", 1, "b", 2, "c", 3);
+ var excluded = m.exclude("b");
+ assertEquals(2, excluded.size());
+ assertFalse(excluded.containsKey("b"));
+ }
+
+ @Test void a13_includeReturnsNeutralType() {
+ var m = MarshalledMap.of("a", 1, "b", 2, "c", 3);
+ var included = m.include("a", "c");
+ assertEquals(2, included.size());
+ assertTrue(included.containsKey("a"));
+ assertTrue(included.containsKey("c"));
+ }
+
+ @Test void a14_unmodifiable() {
+ var m = MarshalledMap.of("a", 1).unmodifiable();
+ assertTrue(m.isUnmodifiable());
+ assertThrows(UnsupportedOperationException.class, () -> m.put("b", 2));
+ assertThrows(UnsupportedOperationException.class, () -> m.remove("a"));
+ assertThrows(UnsupportedOperationException.class, () -> m.putAll(Map.of("b", 2)));
+ assertThrows(UnsupportedOperationException.class, m::clear);
+ assertThrows(UnsupportedOperationException.class, () -> m.putIfAbsent("b", 2));
+ assertThrows(UnsupportedOperationException.class, () -> m.remove("a", 1));
+ assertThrows(UnsupportedOperationException.class, () -> m.replace("a", 2));
+ assertThrows(UnsupportedOperationException.class, () -> m.replace("a", 1, 2));
+ assertThrows(UnsupportedOperationException.class, () -> m.replaceAll((k, v) -> 99));
+ assertThrows(UnsupportedOperationException.class, () -> m.compute("a", (k, v) -> 99));
+ assertThrows(UnsupportedOperationException.class, () -> m.computeIfAbsent("b", k -> 99));
+ assertThrows(UnsupportedOperationException.class, () -> m.computeIfPresent("a", (k, v) -> 99));
+ assertThrows(UnsupportedOperationException.class, () -> m.merge("a", 99, (v1, v2) -> 99));
+ var entryIt = m.entrySet().iterator();
+ entryIt.next();
+ assertThrows(UnsupportedOperationException.class, entryIt::remove);
+ var keyIt = m.keySet().iterator();
+ keyIt.next();
+ assertThrows(UnsupportedOperationException.class, keyIt::remove);
+ var valIt = m.values().iterator();
+ valIt.next();
+ assertThrows(UnsupportedOperationException.class, valIt::remove);
+ assertEquals(1, m.size());
+ }
+
+ @Test void a15_innerMap() {
+ var inner = MarshalledMap.of("a", 1);
+ var outer = MarshalledMap.of("b", 2).inner(inner);
+ assertEquals(1, outer.getInt("a"));
+ assertEquals(2, outer.getInt("b"));
+ }
+
+ @Test void a16_findAcrossKeys() {
+ var m = MarshalledMap.of("alt", "value");
+ assertEquals("value", m.findString("primary", "alt"));
+ }
+
+ @Test void a17_castToMapInterfaceReturnsNeutralFallback() throws Exception {
+ var m = MarshalledMap.ofString("{a:1,b:2}", Json5Parser.DEFAULT);
+ // Casting from a MarshalledMap to the Map interface should fall back to MarshalledMap.
+ Map<?,?> casted = m.cast(Map.class);
+ assertNotNull(casted);
+ assertTrue(casted instanceof MarshalledMap);
+ assertFalse(casted instanceof JsonMap);
+ }
+
+ @Test void a18_emptyMapConstant() {
+ assertTrue(MarshalledMap.EMPTY_MAP.isEmpty());
+ assertThrows(UnsupportedOperationException.class, () -> MarshalledMap.EMPTY_MAP.put("x", 1));
+ }
+
+ @Test void a19_keyValuePairCtor() {
+ var m = new MarshalledMap("a", 1, "b", 2);
+ assertEquals(1, m.getInt("a"));
+ assertEquals(2, m.getInt("b"));
+ }
+
+ @Test void a20_oddKeyValuePairsThrows() {
+ assertThrows(IllegalArgumentException.class, () -> new MarshalledMap("a", 1, "b"));
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ // Additional coverage for previously uncovered methods.
+ //------------------------------------------------------------------------------------------------------------------
+
+ @Test void b01_factoryFilteredMap_empty() {
+ var m = MarshalledMap.filteredMap();
+ assertNotNull(m);
+ // Filtered map skips null/false/-1/empty values.
+ m.put("a", null);
+ m.put("b", false);
+ m.put("c", -1);
+ m.put("d", "kept");
+ assertEquals(1, m.size());
+ assertTrue(m.containsKey("d"));
+ }
+
+ @Test void b02_factoryFilteredMap_withPairs() {
+ // filteredMap(pairs) loads pairs first, then enables filtering for further puts.
+ var m = MarshalledMap.filteredMap("a", "v1", "b", "v2");
+ assertEquals(2, m.size());
+ // Subsequent puts respect the filter.
+ m.put("c", null);
+ assertFalse(m.containsKey("c"));
+ }
+
+ @Test void b03_factoryOfMap() {
+ var src = new LinkedHashMap<String,Object>();
+ src.put("a", 1);
+ src.put("b", 2);
+ var m = MarshalledMap.of(src);
+ assertEquals(2, m.size());
+ assertEquals(1, m.getInt("a"));
+ }
+
+ @Test void b04_factoryOfMapNull() {
+ assertNull(MarshalledMap.of((Map<?,?>)null));
+ }
+
+ @Test void b05_constructorMap() {
+ var src = new LinkedHashMap<>();
+ src.put(1, "v1");
+ src.put("k2", "v2");
+ var m = new MarshalledMap(src);
+ // Keys converted via toString().
+ assertEquals("v1", m.getString("1"));
+ assertEquals("v2", m.getString("k2"));
+ }
+
+ @Test void b06_constructorMapNull() {
+ var m = new MarshalledMap((Map<?,?>)null);
+ assertTrue(m.isEmpty());
+ }
+
+ @Test void b07_appendMap() {
+ var m = MarshalledMap.create();
+ var src = new LinkedHashMap<String,Object>();
+ src.put("x", 1);
+ src.put("y", 2);
+ m.append(src);
+ assertEquals(2, m.size());
+ }
+
+ @Test void b08_appendMap_null() {
+ var m = MarshalledMap.create().append((Map<String,Object>)null);
+ assertTrue(m.isEmpty());
+ }
+
+ @Test void b09_appendFirstMatchingPredicate() {
+ var m = MarshalledMap.create();
+ // String predicate: first non-blank.
+ m.appendFirst(s -> s.length() > 1, "key", "x", "ab", "cd");
+ assertEquals("ab", m.getString("key"));
+ }
+
+ @Test void b10_appendFirstNoMatch() {
+ var m = MarshalledMap.create();
+ m.appendFirst(s -> false, "key", "x", "y");
+ assertFalse(m.containsKey("key"));
+ }
+
+ @Test void b11_appendIfFlagTrue() {
+ var m = MarshalledMap.create().appendIf(true, "k", "v");
+ assertEquals("v", m.getString("k"));
+ }
+
+ @Test void b12_appendIfFlagFalse() {
+ var m = MarshalledMap.create().appendIf(false, "k", "v");
+ assertFalse(m.containsKey("k"));
+ }
+
+ @Test void b13_appendIfPredicateTrue() {
+ var m = MarshalledMap.create().appendIf(s -> !s.isEmpty(), "k", "value");
+ assertEquals("value", m.getString("k"));
+ }
+
+ @Test void b14_appendIfPredicateFalse() {
+ var m = MarshalledMap.create().appendIf(s -> s.length() > 100, "k", "value");
+ assertFalse(m.containsKey("k"));
+ }
+
+ @Test void b15_appendIfAbsent_addsWhenAbsent() {
+ var m = MarshalledMap.create();
+ m.appendIfAbsent("k", "v1");
+ assertEquals("v1", m.getString("k"));
+ }
+
+ @Test void b16_appendIfAbsent_skipWhenPresent() {
+ var m = MarshalledMap.of("k", "existing");
+ m.appendIfAbsent("k", "new");
+ assertEquals("existing", m.getString("k"));
+ }
+
+ @Test void b17_appendIfAbsentIf() {
+ var m = MarshalledMap.create();
+ m.appendIfAbsentIf(s -> s.startsWith("v"), "k", "value");
+ assertEquals("value", m.getString("k"));
+ // Try again with a value that does not match the predicate.
+ m.appendIfAbsentIf(s -> s.startsWith("z"), "k2", "value");
+ assertFalse(m.containsKey("k2"));
+ }
+
+ @Test void b18_toStringWithSerializer() {
+ var m = MarshalledMap.of("a", 1);
+ var s = m.toString(Json5Serializer.DEFAULT);
+ assertNotNull(s);
+ assertTrue(s.contains("a"));
+ }
+
+ @Test void b19_containsKeyNotEmpty() {
+ var m = MarshalledMap.of("a", "value", "b", "", "c", null, "d", 42);
+ assertTrue(m.containsKeyNotEmpty("a"));
+ assertFalse(m.containsKeyNotEmpty("b")); // empty string
+ assertFalse(m.containsKeyNotEmpty("c")); // null
+ assertFalse(m.containsKeyNotEmpty("d")); // not a CharSequence
+ assertFalse(m.containsKeyNotEmpty("none")); // missing
+ }
+
+ @Test void b20_containsOuterKey() {
+ var inner = MarshalledMap.of("x", 1);
+ var outer = MarshalledMap.of("y", 2).inner(inner);
+ assertTrue(outer.containsOuterKey("y"));
+ assertFalse(outer.containsOuterKey("x")); // lives in inner only
+ }
+
+ @Test void b21_containsKeyTraversesInner() {
+ var inner = MarshalledMap.of("x", 1);
+ var outer = MarshalledMap.of("y", 2).inner(inner);
+ assertTrue(outer.containsKey("x"));
+ assertTrue(outer.containsKey("y"));
+ }
+
+ @Test void b22_entrySetWithInner_iterate() {
+ var inner = MarshalledMap.of("x", 1);
+ var outer = MarshalledMap.of("y", 2).inner(inner);
+ var es = outer.entrySet();
+ // Should see both keys.
+ var keys = new HashSet<String>();
+ es.forEach(e -> keys.add(e.getKey()));
+ assertTrue(keys.contains("x"));
+ assertTrue(keys.contains("y"));
+ assertEquals(2, es.size());
+ }
+
+ @Test void b23_entrySetWithInner_setValue() {
+ var inner = MarshalledMap.of("x", 1);
+ var outer = MarshalledMap.of("y", 2).inner(inner);
+ var it = outer.entrySet().iterator();
+ while (it.hasNext()) {
+ var e = it.next();
+ if (e.getKey().equals("y"))
+ e.setValue(99);
+ }
+ assertEquals(99, outer.getInt("y"));
+ }
+
+ @Test void b24_entrySetWithInner_removeThrows() {
+ var inner = MarshalledMap.of("x", 1);
+ var outer = MarshalledMap.of("y", 2).inner(inner);
+ var it = outer.entrySet().iterator();
+ it.next();
+ assertThrows(UnsupportedOperationException.class, it::remove);
+ }
+
+ @Test void b25_findFirstKey() {
+ var m = MarshalledMap.of("a", 1, "b", 2);
+ assertEquals(1, m.find("a", "b"));
+ assertEquals(1, m.find("missing", "a"));
+ assertNull(m.find("none1", "none2"));
+ }
+
+ @Test void b26_findClassType() {
+ var m = MarshalledMap.of("k", "42");
+ assertEquals(Integer.valueOf(42), m.find(Integer.class, "k"));
+ }
+
+ @Test void b27_findBoolean() {
+ var m = MarshalledMap.of("k", "true");
+ assertTrue(m.findBoolean("missing", "k"));
+ }
+
+ @Test void b28_findInt() {
+ var m = MarshalledMap.of("k", "42");
+ assertEquals(Integer.valueOf(42), m.findInt("missing", "k"));
+ }
+
+ @Test void b29_findLong() {
+ var m = MarshalledMap.of("k", "42");
+ assertEquals(Long.valueOf(42L), m.findLong("missing", "k"));
+ }
+
+ @Test void b30_findKeyIgnoreCase() {
+ var m = MarshalledMap.of("FOO", 1);
+ assertEquals("FOO", m.findKeyIgnoreCase("foo"));
+ assertNull(m.findKeyIgnoreCase("bar"));
+ }
+
+ @Test void b31_findList() {
+ var inner = MarshalledList.of("a", "b");
+ var m = MarshalledMap.of("k", inner);
+ var got = m.findList("k");
+ assertNotNull(got);
+ assertEquals(2, got.size());
+ }
+
+ @Test void b32_findMap() {
+ var nested = MarshalledMap.of("x", 1);
+ var m = MarshalledMap.of("k", nested);
+ var got = m.findMap("k");
+ assertNotNull(got);
+ assertEquals(1, got.getInt("x"));
+ }
+
+ @Test void b33_getWithDefault() {
+ var m = MarshalledMap.of("k", "v");
+ assertEquals("v", m.getWithDefault("k", "def"));
+ assertEquals("def", m.getWithDefault("missing", "def"));
+ }
+
+ @Test void b34_getWithDefaultClassType() {
+ var m = MarshalledMap.of("k", "42");
+ assertEquals(Integer.valueOf(42), m.getWithDefault("k", null, Integer.class));
+ assertEquals(Integer.valueOf(99), m.getWithDefault("missing", 99, Integer.class));
+ }
+
+ @Test void b35_getStringArray_fromCollection() {
+ var m = MarshalledMap.of("k", List.of("a", "b"));
+ var arr = m.getStringArray("k");
+ assertNotNull(arr);
+ assertEquals(2, arr.length);
+ }
+
+ @Test void b36_getStringArray_fromObjectArray() {
+ var m = MarshalledMap.of("k", new Object[] { "a", "b" });
+ var arr = m.getStringArray("k");
+ assertNotNull(arr);
+ assertEquals(2, arr.length);
+ }
+
+ @Test void b37_getStringArray_fromStringArray() {
+ var m = MarshalledMap.of("k", new String[] { "a", "b" });
+ var arr = m.getStringArray("k");
+ assertNotNull(arr);
+ assertEquals(2, arr.length);
+ }
+
+ @Test void b38_getStringArray_default() {
+ var m = MarshalledMap.create();
+ var def = new String[] { "z" };
+ assertSame(def, m.getStringArray("missing", def));
+ }
+
+ @Test void b39_getStringArray_fromString() {
+ var m = MarshalledMap.of("k", "a,b,c");
+ var arr = m.getStringArray("k");
+ assertNotNull(arr);
+ assertTrue(arr.length >= 1);
+ }
+
+ @Test void b40_getClassMeta() {
+ var m = MarshalledMap.of("k", "v");
+ assertNotNull(m.getClassMeta("k"));
+ }
+
+ @Test void b41_getFirstKey() {
+ var m = MarshalledMap.of("first", 1, "second", 2);
+ assertEquals("first", m.getFirstKey());
+ }
+
+ @Test void b42_getFirstKey_empty() {
+ assertNull(MarshalledMap.create().getFirstKey());
+ }
+
+ @Test void b43_getBoolean() {
+ var m = MarshalledMap.of("k", "true");
+ assertTrue(m.getBoolean("k"));
+ assertNull(m.getBoolean("missing"));
+ assertEquals(Boolean.FALSE, m.getBoolean("missing", false));
+ }
+
+ @Test void b44_getInt() {
+ var m = MarshalledMap.of("k", "42");
+ assertEquals(Integer.valueOf(42), m.getInt("k"));
+ assertNull(m.getInt("missing"));
+ assertEquals(Integer.valueOf(99), m.getInt("missing", 99));
+ }
+
+ @Test void b45_getLong() {
+ var m = MarshalledMap.of("k", "42");
+ assertEquals(Long.valueOf(42L), m.getLong("k"));
+ assertNull(m.getLong("missing"));
+ assertEquals(Long.valueOf(99L), m.getLong("missing", 99L));
+ }
+
+ @Test void b46_getString_default() {
+ var m = MarshalledMap.create();
+ assertEquals("def", m.getString("missing", "def"));
+ }
+
+ @Test void b47_getList_default() {
+ var m = MarshalledMap.create();
+ var def = MarshalledList.of(1, 2);
+ assertSame(def, m.getList("missing", def));
+ }
+
+ @Test void b48_getList_typed() {
+ var m = MarshalledMap.of("k", List.of("1", "2", "3"));
+ var def = new ArrayList<Integer>();
+ var got = m.getList("k", Integer.class, def);
+ assertEquals(3, got.size());
+ assertEquals(Integer.valueOf(1), got.get(0));
+ }
+
+ @Test void b49_getList_typed_default() {
+ var m = MarshalledMap.create();
+ var def = new ArrayList<Integer>();
+ assertSame(def, m.getList("missing", Integer.class, def));
+ }
+
+ @Test void b50_getMap_default() {
+ var m = MarshalledMap.create();
+ var def = MarshalledMap.of("x", 1);
+ assertSame(def, m.getMap("missing", def));
+ }
+
+ @Test void b51_getMap_typed() {
+ var inner = new LinkedHashMap<String,Object>();
+ inner.put("a", "1");
+ var m = MarshalledMap.of("k", inner);
+ var def = new LinkedHashMap<String,Integer>();
+ var got = m.getMap("k", String.class, Integer.class, def);
+ assertEquals(1, got.get("a"));
+ }
+
+ @Test void b52_getMap_typed_default() {
+ var m = MarshalledMap.create();
+ var def = new LinkedHashMap<String,Integer>();
+ assertSame(def, m.getMap("missing", String.class, Integer.class, def));
+ }
+
+ @Test void b53_getMapCreateIfNotExists_returnsExisting() {
+ var existing = MarshalledMap.of("x", 1);
+ var m = MarshalledMap.of("k", existing);
+ var got = m.getMap("k", true);
+ assertEquals(1, got.getInt("x"));
+ }
+
+ @Test void b54_getListCreateIfNotExists_returnsExisting() {
+ var existing = MarshalledList.of(1, 2, 3);
+ var m = MarshalledMap.of("k", existing);
+ var got = m.getList("k", true);
+ assertEquals(3, got.size());
+ }
+
+ @Test void b55_get_typeArgs() {
+ var m = MarshalledMap.of("k", "42");
+ Integer val = m.get("k", Integer.class);
+ assertEquals(Integer.valueOf(42), val);
+ }
+
+ @Test void b56_get_parameterizedType() {
+ var m = MarshalledMap.of("k", List.of("1", "2"));
+ List<Integer> val = m.get("k", List.class, Integer.class);
+ assertNotNull(val);
+ assertEquals(2, val.size());
+ }
+
+ @Test void b57_isShortcut() {
+ var m = MarshalledMap.of("flag", "true");
+ assertTrue(m.is("flag", false));
+ assertFalse(m.is("missing", false));
+ assertTrue(m.is("missing", true));
+ }
+
+ @Test void b58_isUnmodifiable_default() {
+ assertFalse(MarshalledMap.create().isUnmodifiable());
+ }
+
+ @Test void b59_keepAll() {
+ var m = MarshalledMap.of("a", 1, "b", 2, "c", 3);
+ m.keepAll("a", "c");
+ assertEquals(2, m.size());
+ assertTrue(m.containsKey("a"));
+ assertTrue(m.containsKey("c"));
+ assertFalse(m.containsKey("b"));
+ }
+
+ @Test void b60_keySetWithInner() {
+ var inner = MarshalledMap.of("x", 1);
+ var outer = MarshalledMap.of("y", 2).inner(inner);
+ var keys = outer.keySet();
+ assertTrue(keys.contains("x"));
+ assertTrue(keys.contains("y"));
+ }
+
+ @Test void b61_modifiable_alreadyModifiable() {
+ var m = MarshalledMap.of("a", 1);
+ assertSame(m, m.modifiable());
+ }
+
+ @Test void b62_modifiable_fromUnmodifiable() {
+ var m = MarshalledMap.of("a", 1).unmodifiable();
+ var mod = m.modifiable();
+ assertNotSame(m, mod);
+ mod.put("b", 2); // should succeed
+ assertEquals(2, mod.size());
+ }
+
+ @Test void b63_unmodifiable_idempotent() {
+ var m = MarshalledMap.of("a", 1).unmodifiable();
+ assertSame(m, m.unmodifiable());
+ }
+
+ @Test void b64_removeAllCollection() {
+ var m = MarshalledMap.of("a", 1, "b", 2, "c", 3);
+ m.removeAll(List.of("a", "c"));
+ assertEquals(1, m.size());
+ assertTrue(m.containsKey("b"));
+ }
+
+ @Test void b65_removeAllVarargs() {
+ var m = MarshalledMap.of("a", 1, "b", 2, "c", 3);
+ m.removeAll("a", "c");
+ assertEquals(1, m.size());
+ }
+
+ @Test void b66_removeBoolean() {
+ var m = MarshalledMap.of("k", "true");
+ assertTrue(m.removeBoolean("k"));
+ assertFalse(m.containsKey("k"));
+ }
+
+ @Test void b67_removeBoolean_default() {
+ var m = MarshalledMap.create();
+ assertEquals(Boolean.FALSE, m.removeBoolean("missing", false));
+ }
+
+ @Test void b68_removeInt() {
+ var m = MarshalledMap.of("k", "42");
+ assertEquals(Integer.valueOf(42), m.removeInt("k"));
+ assertFalse(m.containsKey("k"));
+ }
+
+ @Test void b69_removeInt_default() {
+ var m = MarshalledMap.create();
+ assertEquals(Integer.valueOf(7), m.removeInt("missing", 7));
+ }
+
+ @Test void b70_removeString() {
+ var m = MarshalledMap.of("k", "v");
+ assertEquals("v", m.removeString("k"));
+ assertFalse(m.containsKey("k"));
+ }
+
+ @Test void b71_removeString_default() {
+ var m = MarshalledMap.create();
+ assertEquals("def", m.removeString("missing", "def"));
+ }
+
+ @Test void b72_removeWithDefault() {
+ var m = MarshalledMap.of("k", "42");
+ assertEquals(Integer.valueOf(42), m.removeWithDefault("k", 0, Integer.class));
+ assertFalse(m.containsKey("k"));
+ }
+
+ @Test void b73_session_setterChain() {
+ var m = MarshalledMap.create();
+ var ms = MarshallingContext.DEFAULT_SESSION;
+ m.session(ms);
+ assertSame(ms, m.getMarshallingSession());
+ }
+
+ @Test void b74_setBeanSession() {
+ var m = MarshalledMap.create();
+ var ms = MarshallingContext.DEFAULT_SESSION;
+ m.setBeanSession(ms);
+ assertSame(ms, m.getMarshallingSession());
+ }
+
+ @Test void b75_filteredCustom() {
+ // Filter only retains values that start with 'k'.
+ var m = MarshalledMap.create().filtered(v -> v instanceof String s && s.startsWith("k"));
+ m.put("a", "kept");
+ m.put("b", "skipped");
+ assertEquals(1, m.size());
+ }
+
+ @Test void b76_castToBean() {
+ var m = MarshalledMap.of("name", "alice", "age", 30);
+ var bean = m.cast(B76_Bean.class);
+ assertEquals("alice", bean.name);
+ assertEquals(30, bean.age);
+ }
+
+ public static class B76_Bean {
+ public String name;
+ public int age;
+ }
+
+ @Test void b77_putAtAndGetAt() {
+ var m = MarshalledMap.create();
+ m.putAt("a", "value");
+ assertEquals("value", m.getAt("a", String.class));
+ }
+
+ @Test void b78_postAt() {
+ var m = MarshalledMap.create();
+ m.put("list", new ArrayList<>());
+ m.postAt("list", "x");
+ var list = (List<?>) m.get("list");
+ assertEquals(1, list.size());
+ assertEquals("x", list.get(0));
+ }
+
+ @Test void b79_deleteAt() {
+ var m = MarshalledMap.of("a", "v");
+ m.deleteAt("a");
+ assertFalse(m.containsKey("a"));
+ }
+
+ @Test void b80_emptyMapEntrySetAndKeySetAndValues() {
+ assertTrue(MarshalledMap.EMPTY_MAP.entrySet().isEmpty());
+ assertTrue(MarshalledMap.EMPTY_MAP.keySet().isEmpty());
+ assertTrue(MarshalledMap.EMPTY_MAP.values().isEmpty());
+ assertThrows(UnsupportedOperationException.class, () -> MarshalledMap.EMPTY_MAP.remove("x"));
+ }
+
+ @Test void b81_unmodifiableConstructorWithNull() {
+ // UnmodifiableMarshalledMap is private but reachable via .unmodifiable().
+ // Construct from a null source by going through the public API.
+ var m = MarshalledMap.create().unmodifiable();
+ assertTrue(m.isUnmodifiable());
+ assertEquals(0, m.size());
+ }
+}
diff --git a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/collections/ResolvingMarshalledMapTest.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/collections/ResolvingMarshalledMapTest.java
new file mode 100644
index 0000000000..7f8e9c2a0b
--- /dev/null
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/collections/ResolvingMarshalledMapTest.java
@@ -0,0 +1,186 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.juneau.marshall.collections;
+
+import static org.apache.juneau.commons.utils.CollectionUtils.*;
+import static org.apache.juneau.junit.bct.BctAssertions.*;
+import static org.junit.jupiter.api.Assertions.*;
+
+import java.util.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.commons.svl.*;
+import org.apache.juneau.marshall.*;
+import org.junit.jupiter.api.*;
+
+class ResolvingMarshalledMapTest extends TestBase {
+
+ //====================================================================================================
+ // test - Basic tests
+ //====================================================================================================
+ @Test void a01_basic() {
+ var vr = VarResolver.create().defaultVars().vars(XVar.class).build();
+ var m = new ResolvingMarshalledMap(vr.createSession());
+
+ m.put("foo", "$X{a}");
+ assertEquals("1", m.get("foo"));
+
+ m.put("foo", a("$X{a}"));
+ assertList(m.get("foo"), "1");
+
+ m.put("foo", list("$X{a}"));
+ assertList(m.get("foo"), "1");
+
+ m.put("foo", m("k1","$X{a}"));
+ assertBean(m, "foo{k1}", "{1}");
+ }
+
+ public static class XVar extends MapVar {
+ public XVar() {
+ super("X", JsonMap.of("a", 1, "b", 2, "c", 3));
+ }
+ }
+
+ //====================================================================================================
+ // testNulls
+ //====================================================================================================
+ @Test void a02_nulls() {
+ var vr = VarResolver.create().defaultVars().vars(XVar.class).build();
+ var m = new ResolvingMarshalledMap(vr.createSession());
+
+ m.put("foo", null);
+ assertNull(m.get("foo"));
+
+ m.put("foo", a((String)null));
+ assertList(m.get("foo"), (Object)null);
+
+ m.put("foo", l((String)null));
+ assertList(m.get("foo"), (Object)null);
+
+ m.put("foo", m("k1",null));
+ assertBean(m, "foo{k1}", "{<null>}");
+ }
+
+ //====================================================================================================
+ // testNonStrings
+ //====================================================================================================
+ @Test void a03_nonStrings() {
+ var vr = VarResolver.create().defaultVars().vars(XVar.class).build();
+ var m = new ResolvingMarshalledMap(vr.createSession());
+
+ m.put("foo", FooEnum.ONE);
+ assertString("ONE", m.get("foo"));
+ m.put("foo", ao(FooEnum.ONE));
+ assertList(m.get("foo"), "ONE");
+
+ m.put("foo", l(FooEnum.ONE));
+ assertList(m.get("foo"), "ONE");
+
+ m.put("foo", m(FooEnum.ONE,FooEnum.ONE));
+ assertBean(m, "foo", "{ONE=ONE}");
+ }
+
+ public enum FooEnum {
+ ONE
+ }
+
+ //====================================================================================================
+ // testInner - Test inner maps
+ //====================================================================================================
+ @Test void a04_inner() {
+ var vr = VarResolver.create().defaultVars().vars(XVar.class).build();
+ var m = new ResolvingMarshalledMap(vr.createSession());
+ var m2 = new JsonMap();
+ var m3 = new JsonMap();
+ m.inner(m2);
+ m2.inner(m3);
+
+ m3.put("foo", "$X{a}");
+ assertEquals("1", m.get("foo"));
+
+ m3.put("foo", a("$X{a}"));
+ assertList(m.get("foo"), "1");
+
+ m3.put("foo", l("$X{a}"));
+ assertList(m.get("foo"), "1");
+
+ m3.put("foo", m("k1","$X{a}"));
+ assertBean(m, "foo{k1}", "{1}");
+ }
+
+ //====================================================================================================
+ // testFluentSetters - Test fluent setter overrides
+ //====================================================================================================
+ @Test void a05_fluentSetters() {
+ var vr = VarResolver.create().defaultVars().vars(XVar.class).build();
+ var m = new ResolvingMarshalledMap(vr.createSession());
+
+ // Test inner() returns same instance for fluent chaining
+ var innerMap = new HashMap<String,Object>();
+ innerMap.put("test", "$X{a}");
+ assertSame(m, m.inner(innerMap));
+ assertEquals("1", m.get("test"));
+
+ // Test session() returns same instance
+ MarshallingSession session = MarshallingContext.DEFAULT.getSession();
+ assertSame(m, m.session(session));
+
+ // Test append(String, Object) returns same instance
+ assertSame(m, m.append("key1", "$X{b}"));
+ assertEquals("2", m.get("key1"));
+
+ // Test append(Map) returns same instance
+ var appendMap = new HashMap<String,Object>();
+ appendMap.put("key2", "$X{c}");
+ assertSame(m, m.append(appendMap));
+ assertEquals("3", m.get("key2"));
+
+ // Test appendIf() returns same instance
+ assertSame(m, m.appendIf(true, "key3", "value3"));
+ assertEquals("value3", m.get("key3"));
+ assertSame(m, m.appendIf(false, "key4", "value4"));
+ assertNull(m.get("key4"));
+
+ // Test filtered() returns same instance
+ assertSame(m, m.filtered(x -> x != null));
+
+ // Test keepAll() returns same instance
+ assertSame(m, m.keepAll("key1", "key2"));
+
+ // Test setBeanSession() returns same instance
+ assertSame(m, m.setBeanSession(session));
+
+ // Test modifiable() returns a new instance when unmodifiable
+ assertSame(m, m.modifiable());
+
+ // Test unmodifiable() returns same instance
+ assertSame(m, m.unmodifiable());
+ }
+
+ @Test void a06_fluentChaining() {
+ var vr = VarResolver.create().defaultVars().vars(XVar.class).build();
+ // Test multiple fluent calls can be chained
+ var m = new ResolvingMarshalledMap(vr.createSession())
+ .append("key1", "$X{a}")
+ .append("key2", "$X{b}")
+ .appendIf(true, "key3", "$X{c}");
+
+ assertEquals("1", m.get("key1"));
+ assertEquals("2", m.get("key2"));
+ assertEquals("3", m.get("key3"));
+ }
+}
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/csv/CsvCellSerializer_Test.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/csv/CsvCellSerializer_Test.java
index 2519acb4c1..76bf6cd237 100644
--- a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/csv/CsvCellSerializer_Test.java
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/csv/CsvCellSerializer_Test.java
@@ -34,11 +34,11 @@ import org.junit.jupiter.api.*;
class CsvCellSerializer_Test extends TestBase {
private static CsvSerializerSession session() {
- return (CsvSerializerSession) CsvSerializer.create().allowNestedStructures(true).build().getSession();
+ return CsvSerializer.create().allowNestedStructures(true).build().getSession();
}
private static CsvSerializerSession sessionSemicolonBytes() {
- return (CsvSerializerSession) CsvSerializer.create()
+ return CsvSerializer.create()
.allowNestedStructures(true)
.byteArrayFormat(CsvByteArrayCellFormat.SEMICOLON_DELIMITED)
.build()
diff --git a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/csv/CsvSerializerSession_Test.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/csv/CsvSerializerSession_Test.java
index e5cb5b9e2c..5b3a088ad1 100644
--- a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/csv/CsvSerializerSession_Test.java
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/csv/CsvSerializerSession_Test.java
@@ -63,7 +63,7 @@ class CsvSerializerSession_Test extends TestBase {
assertTrue(csv.contains("<NULL>"), "Expected default null marker: " + csv);
}
- @Test void a03_property_byteArrayFormat() throws Exception {
+ @Test void a03_property_byteArrayFormat() {
// Hits Builder.property() short property name dispatch for byteArrayFormat.
var session = CsvSerializer.DEFAULT
.createSession()
@@ -72,7 +72,7 @@ class CsvSerializerSession_Test extends TestBase {
assertNotNull(session);
}
- @Test void a04_property_byteArrayFormat_qualifiedName() throws Exception {
+ @Test void a04_property_byteArrayFormat_qualifiedName() {
// Hits Builder.property() qualified name dispatch.
var session = CsvSerializer.DEFAULT
.createSession()
@@ -81,7 +81,7 @@ class CsvSerializerSession_Test extends TestBase {
assertNotNull(session);
}
- @Test void a05_property_allowNestedStructures() throws Exception {
+ @Test void a05_property_allowNestedStructures() {
var session = CsvSerializer.DEFAULT
.createSession()
.property("allowNestedStructures", true)
@@ -89,7 +89,7 @@ class CsvSerializerSession_Test extends TestBase {
assertNotNull(session);
}
- @Test void a06_property_allowNestedStructures_qualifiedName() throws Exception {
+ @Test void a06_property_allowNestedStructures_qualifiedName() {
var session = CsvSerializer.DEFAULT
.createSession()
.property("CsvSerializerSession.allowNestedStructures", false)
@@ -97,7 +97,7 @@ class CsvSerializerSession_Test extends TestBase {
assertNotNull(session);
}
- @Test void a07_property_nullValue() throws Exception {
+ @Test void a07_property_nullValue() {
var session = CsvSerializer.DEFAULT
.createSession()
.property("nullValue", "NIL")
@@ -105,7 +105,7 @@ class CsvSerializerSession_Test extends TestBase {
assertNotNull(session);
}
- @Test void a08_property_nullValue_qualifiedName() throws Exception {
+ @Test void a08_property_nullValue_qualifiedName() {
var session = CsvSerializer.DEFAULT
.createSession()
.property("CsvSerializerSession.nullValue", "<EMPTY>")
@@ -113,7 +113,7 @@ class CsvSerializerSession_Test extends TestBase {
assertNotNull(session);
}
- @Test void a09_property_unknownKey_delegatesToSuper() throws Exception {
+ @Test void a09_property_unknownKey_delegatesToSuper() {
// Default branch in Builder.property() switch.
var session = CsvSerializer.DEFAULT
.createSession()
@@ -122,13 +122,13 @@ class CsvSerializerSession_Test extends TestBase {
assertNotNull(session);
}
- @Test void a10_property_nullKey_throws() throws Exception {
+ @Test void a10_property_nullKey_throws() {
// Null key delegates to super (line 138-141), which throws.
var b = CsvSerializer.DEFAULT.createSession();
assertThrows(IllegalArgumentException.class, () -> b.property(null, "x"));
}
- @Test void a11_create_nullCtx_throws() throws Exception {
+ @Test void a11_create_nullCtx_throws() {
// Static create(ctx) with null ctx -> assertArgNotNull throws.
CsvSerializer ctx = null;
assertThrows(IllegalArgumentException.class, () -> CsvSerializerSession.create(ctx));
@@ -501,7 +501,7 @@ class CsvSerializerSession_Test extends TestBase {
@Test void i01_mapPath_withNullKeys() throws Exception {
// Map path: null keys in header (line 334-335).
var l = new LinkedList<Map<Object,Object>>();
- var m = new LinkedHashMap<Object,Object>();
+ var m = new LinkedHashMap<>();
m.put(null, "v1");
m.put("k", "v2");
l.add(m);
diff --git a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/parser/ParserSet_OverridingBeanStore_Test.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/encoders/EncoderSet_OverridingBeanStore_Test.java
similarity index 79%
copy from juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/parser/ParserSet_OverridingBeanStore_Test.java
copy to juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/encoders/EncoderSet_OverridingBeanStore_Test.java
index 54a80d2014..2f214d0ec4 100644
--- a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/parser/ParserSet_OverridingBeanStore_Test.java
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/encoders/EncoderSet_OverridingBeanStore_Test.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.juneau.marshall.parser;
+package org.apache.juneau.marshall.encoders;
import static org.junit.jupiter.api.Assertions.*;
@@ -24,11 +24,14 @@ import org.apache.juneau.junit5.*;
import org.junit.jupiter.api.*;
/**
- * Verifies that {@link ParserSet.Builder#overridingBeanStore(BeanStore)} threads the overlay
+ * Verifies that {@link EncoderSet.Builder#overridingBeanStore(BeanStore)} threads the overlay
* through to the builder's reflective bean lookups so test-time overrides win over the builder's
* regular bean store entries.
*/
-class ParserSet_OverridingBeanStore_Test extends TestBase {
+@SuppressWarnings({
+ "resource" // Closeable resources in tests are intentionally unassigned; closing is handled by test infrastructure.
+})
+class EncoderSet_OverridingBeanStore_Test extends TestBase {
interface Marker {
String tag();
@@ -41,7 +44,7 @@ class ParserSet_OverridingBeanStore_Test extends TestBase {
var overlay = new TestBeanStore().override(Marker.class, () -> "test-overlay");
- var b = ParserSet.create(defaultStore).overridingBeanStore(overlay);
+ var b = EncoderSet.create(defaultStore).overridingBeanStore(overlay);
var resolved = b.beanStore().getBean(Marker.class).orElseThrow();
assertEquals("test-overlay", resolved.tag(),
@@ -54,7 +57,7 @@ class ParserSet_OverridingBeanStore_Test extends TestBase {
defaultStore.addBean(Marker.class, () -> "production");
var overlay = new TestBeanStore();
- var b = ParserSet.create(defaultStore).overridingBeanStore(overlay);
+ var b = EncoderSet.create(defaultStore).overridingBeanStore(overlay);
var resolved = b.beanStore().getBean(Marker.class).orElseThrow();
assertEquals("production", resolved.tag());
@@ -63,9 +66,9 @@ class ParserSet_OverridingBeanStore_Test extends TestBase {
@Test
void a03_build_succeedsWithOverlayInstalled() {
var overlay = new TestBeanStore();
- var set = ParserSet.create()
+ var set = EncoderSet.create()
.overridingBeanStore(overlay)
- .add(org.apache.juneau.marshall.json.JsonParser.class)
+ .add(GzipEncoder.class)
.build();
assertNotNull(set);
}
diff --git a/juneau-utest/src/test/java/org/apache/juneau/encoders/EncoderSet_Test.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/encoders/EncoderSet_Test.java
old mode 100755
new mode 100644
similarity index 95%
copy from juneau-utest/src/test/java/org/apache/juneau/encoders/EncoderSet_Test.java
copy to juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/encoders/EncoderSet_Test.java
index c1562f4dcc..539d18ab63
--- a/juneau-utest/src/test/java/org/apache/juneau/encoders/EncoderSet_Test.java
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/encoders/EncoderSet_Test.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.juneau.encoders;
+package org.apache.juneau.marshall.encoders;
import static org.apache.juneau.commons.utils.CollectionUtils.*;
import static org.apache.juneau.junit.bct.BctAssertions.*;
@@ -22,10 +22,12 @@ import static org.junit.jupiter.api.Assertions.*;
import org.apache.juneau.*;
import org.apache.juneau.commons.inject.*;
-import org.apache.juneau.marshall.encoders.*;
import org.junit.jupiter.api.*;
-@SuppressWarnings({"java:S5778" /* assertThrows lambdas with chained calls; intermediate invocations do not throw in practice */})
+@SuppressWarnings({
+ "java:S5778", // assertThrows lambdas with chained calls; intermediate invocations do not throw in practice
+ "resource" // Stream/reader instances are intentional short-lived test fixtures; auto-close not required for these assertions.
+})
class EncoderSet_Test extends TestBase {
//====================================================================================================
diff --git a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hjson/HjsonEdgeCases_Test.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hjson/HjsonEdgeCases_Test.java
index 7bb0009da0..65a5a23643 100644
--- a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hjson/HjsonEdgeCases_Test.java
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hjson/HjsonEdgeCases_Test.java
@@ -27,7 +27,9 @@ import org.junit.jupiter.api.*;
/**
* Edge case tests for {@link HjsonSerializer} and {@link HjsonParser}.
*/
-@SuppressWarnings("unchecked")
+@SuppressWarnings({
+ "unchecked" // Unchecked cast required for generic test utility.
+})
class HjsonEdgeCases_Test extends TestBase {
@Test
diff --git a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hjson/HjsonMediaType_Test.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hjson/HjsonMediaType_Test.java
index ba85177358..37f27c801c 100644
--- a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hjson/HjsonMediaType_Test.java
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hjson/HjsonMediaType_Test.java
@@ -27,7 +27,9 @@ import org.junit.jupiter.api.*;
/**
* Tests for Hjson media type configuration.
*/
-@SuppressWarnings("unchecked")
+@SuppressWarnings({
+ "unchecked" // Unchecked cast required for generic test utility.
+})
class HjsonMediaType_Test {
@Test
diff --git a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hjson/HjsonParser_Test.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hjson/HjsonParser_Test.java
index ea67cc73e3..0d4967dc14 100644
--- a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hjson/HjsonParser_Test.java
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hjson/HjsonParser_Test.java
@@ -27,7 +27,9 @@ import org.junit.jupiter.api.*;
/**
* Tests for {@link HjsonParser}.
*/
-@SuppressWarnings("unchecked")
+@SuppressWarnings({
+ "unchecked" // Unchecked cast required for generic test utility.
+})
class HjsonParser_Test extends TestBase {
@Test
diff --git a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hocon/HoconEdgeCases_Test.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hocon/HoconEdgeCases_Test.java
index fb65e633ee..e69811e0a0 100644
--- a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hocon/HoconEdgeCases_Test.java
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hocon/HoconEdgeCases_Test.java
@@ -27,7 +27,9 @@ import org.junit.jupiter.api.*;
/**
* Edge case tests for {@link HoconSerializer} and {@link HoconParser}.
*/
-@SuppressWarnings("unchecked")
+@SuppressWarnings({
+ "unchecked" // Unchecked cast required for generic test utility.
+})
class HoconEdgeCases_Test extends TestBase {
@Test
diff --git a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hocon/HoconMediaType_Test.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hocon/HoconMediaType_Test.java
index d149d87d8c..cf3353fa81 100644
--- a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hocon/HoconMediaType_Test.java
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hocon/HoconMediaType_Test.java
@@ -27,7 +27,9 @@ import org.junit.jupiter.api.*;
/**
* Tests for HOCON media type configuration.
*/
-@SuppressWarnings("unchecked")
+@SuppressWarnings({
+ "unchecked" // Unchecked cast required for generic test utility.
+})
class HoconMediaType_Test {
@Test
diff --git a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hocon/HoconMerging_Test.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hocon/HoconMerging_Test.java
index 8c38653cfb..191d34c043 100644
--- a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hocon/HoconMerging_Test.java
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hocon/HoconMerging_Test.java
@@ -25,7 +25,9 @@ import org.junit.jupiter.api.*;
/**
* Object merging tests for {@link HoconParser}.
*/
-@SuppressWarnings("unchecked")
+@SuppressWarnings({
+ "unchecked" // Unchecked cast required for generic test utility.
+})
class HoconMerging_Test {
@Test
diff --git a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hocon/HoconParserSession_Test.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hocon/HoconParserSession_Test.java
index d42ce99f07..031dcbaf69 100644
--- a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hocon/HoconParserSession_Test.java
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hocon/HoconParserSession_Test.java
@@ -28,13 +28,16 @@ import org.junit.jupiter.api.*;
/**
* Targeted coverage tests for {@link HoconParserSession} focusing on uncovered
- * gaps reported by JaCoCo (TODO-155 Tier E14).
+ * gaps reported by JaCoCo (see coverage analysis issue 155, Tier E14).
*
* <p>Each test exercises a specific branch in HoconParserSession not already
* covered by the existing {@code Hocon*_Test} suite.
*/
@SuppressWarnings({
- "unchecked" // Parser returns Object; cast to Map/List in tests
+ "unchecked", // Parser returns Object; cast to Map/List in tests
+ "unused", // Exception parameter intentionally unused in catch block; only the fact of the exception matters.
+ "java:S125", // Commented-out code is retained as historical reference / future re-enable candidate.
+ "java:S5976" // Separate test methods preferred over parameterized for clarity and independent failure reporting.
})
class HoconParserSession_Test extends TestBase {
@@ -57,6 +60,7 @@ class HoconParserSession_Test extends TestBase {
assertNull(m);
}
+ @SuppressWarnings("resource")
@Test
void a03_ioExceptionFromReader() {
// Triggers the catch (IOException e) in doParse → wraps in ParseException.
@@ -499,6 +503,9 @@ class HoconParserSession_Test extends TestBase {
}
@Test
+ @SuppressWarnings({
+ "java:S2699" // Test verifies no exception is thrown; assertDoesNotThrow wraps are implicit.
+ })
void l04_unterminatedObject() {
// EOF inside `{ ... ` — parseObject EOF branch (line 317).
var hocon = "a { x = 1";
@@ -512,6 +519,9 @@ class HoconParserSession_Test extends TestBase {
}
@Test
+ @SuppressWarnings({
+ "java:S2699" // Test verifies no exception is thrown; assertDoesNotThrow wraps are implicit.
+ })
void l05_emptyParseValue() throws Exception {
// parseValue EOF — value of `a =` followed by EOF.
// (Hits the "EOF -> null" arm at line 307.)
@@ -643,6 +653,7 @@ class HoconParserSession_Test extends TestBase {
public byte[] data;
}
- @SuppressWarnings("unused")
+ @SuppressWarnings({
+ })
private static ParserPipe unused() { return null; } // keep import happy without ?-suppression
}
diff --git a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hocon/HoconPath_Test.java b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hocon/HoconPath_Test.java
index b8b71f38a8..38c67efa10 100644
--- a/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hocon/HoconPath_Test.java
+++ b/juneau-core/juneau-marshall/src/test/java/org/apache/juneau/marshall/hocon/HoconPath_Test.java
@@ -25,7 +25,9 @@ import org.junit.jupiter.api.*;
/**
* Path expression tests for {@link HoconParser}.
*/
-@SuppressWarnings("unchecked")
+@SuppressWarnings({
+ "unchecked" // Unchecked cast required for generic test utility.
+})
class HoconPath_Test {
@Test
... 132865 lines suppressed ...