9191import  static  org .elasticsearch .cluster .metadata .IndexMetadata .SETTING_VERSION_CREATED ;
9292import  static  org .elasticsearch .test .hamcrest .ElasticsearchAssertions .assertToXContentEquivalent ;
9393import  static  org .hamcrest .Matchers .aMapWithSize ;
94- import  static  org .hamcrest .Matchers .contains ;
95- import  static  org .hamcrest .Matchers .containsInAnyOrder ;
9694import  static  org .hamcrest .Matchers .containsString ;
9795import  static  org .hamcrest .Matchers .equalTo ;
9896import  static  org .hamcrest .Matchers .hasKey ;
@@ -2255,7 +2253,10 @@ public void testSerialization() throws IOException {
22552253
22562254        // check it deserializes ok 
22572255        NamedWriteableRegistry  namedWriteableRegistry  = new  NamedWriteableRegistry (ClusterModule .getNamedWriteables ());
2258-         ClusterState  deserialisedClusterState  = ClusterState .readFrom (new  NamedWriteableAwareStreamInput (out .bytes ().streamInput (), namedWriteableRegistry ), null );
2256+         ClusterState  deserialisedClusterState  = ClusterState .readFrom (
2257+             new  NamedWriteableAwareStreamInput (out .bytes ().streamInput (), namedWriteableRegistry ),
2258+             null 
2259+         );
22592260
22602261        // check it matches the original object 
22612262        Metadata  deserializedMetadata  = deserialisedClusterState .metadata ();
@@ -2271,9 +2272,14 @@ public void testCombinedReservedMetadataSerialization() throws IOException {
22712272            .putCustom (
22722273                ProjectStateRegistry .TYPE ,
22732274                ProjectStateRegistry .builder ()
2274-                     .putReservedStateMetadata (ProjectId .DEFAULT , ReservedStateMetadata .builder ("file_settings" ).putHandler (
2275-                         new  ReservedStateHandlerMetadata ("settings" , Set .of (PROJECT_SETTING .getKey (), PROJECT_SETTING2 .getKey ()))
2276-                     ).build ())
2275+                     .putReservedStateMetadata (
2276+                         ProjectId .DEFAULT ,
2277+                         ReservedStateMetadata .builder ("file_settings" )
2278+                             .putHandler (
2279+                                 new  ReservedStateHandlerMetadata ("settings" , Set .of (PROJECT_SETTING .getKey (), PROJECT_SETTING2 .getKey ()))
2280+                             )
2281+                             .build ()
2282+                     )
22772283                    .build ()
22782284            )
22792285            .build ();
0 commit comments