/* Ċ Ġ* ĠCopyright ĠOpen Search ĠContributors Ċ Ġ* ĠSPDX - License - Identifier : ĠApache - 2 . 0 Ċ Ġ*/ Ċ Ċ package Ġorg . opense arch . index management . index state management . transport . action . change policy Ċ Ċ import Ġorg . opense arch . common . io . stream . Bytes Stream Output Ċ import Ġorg . opense arch . common . io . stream . Stream Input Ċ import Ġorg . opense arch . index management . index state management . model . Change Policy Ċ import Ġorg . opense arch . index management . index state management . model . State Filter Ċ import Ġorg . opense arch . test . Open Search TestCase Ċ Ċ class ĠChange Policy Request Tests Ġ: ĠOpen Search TestCase () Ġ{ ĊĊĠĠĠ Ġfun Ġ` test Ġchange Ġpolicy Ġrequest `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġindices Ġ= ĠlistOf (" index 1 ", Ġ" index 2 ") ĊĠĠĠĠĠĠĠ Ġval Ġstate Filter Ġ= ĠState Filter (" state 1 ") ĊĠĠĠĠĠĠĠ Ġval Ġchange Policy Ġ= ĠChange Policy (" policy ID ", Ġ" state 1 ", ĠlistOf ( state Filter ), Ġtrue ) ĊĠĠĠĠĠĠĠ Ġval Ġreq Ġ= ĠChange Policy Request ( indices , Ġchange Policy ) ĊĊĠĠĠĠĠĠĠ Ġval Ġout Ġ= ĠBytes Stream Output () ĊĠĠĠĠĠĠĠ Ġreq . writeTo ( out ) ĊĠĠĠĠĠĠĠ Ġval Ġsin Ġ= ĠStream Input . wrap ( out . bytes (). to Bytes Ref (). bytes ) ĊĠĠĠĠĠĠĠ Ġval Ġnew Req Ġ= ĠChange Policy Request ( sin ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( indices , Ġnew Req . indices ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( change Policy , Ġnew Req . change Policy ) ĊĠĠĠ Ġ} Ċ } Ċ