@@ -155,6 +155,74 @@ protected void doAssertions(TrustBundle bundle) throws Exception
155155 }.perform ();
156156 }
157157
158+ @ Test
159+ public void testUpdateBundleAttributes_noChange_assertNameChanged () throws Exception
160+ {
161+ new TestPlan ()
162+ {
163+ protected Collection <TrustBundle > bundles ;
164+
165+ @ Override
166+ protected Collection <TrustBundle > getBundlesToAdd ()
167+ {
168+ try
169+ {
170+ bundles = new ArrayList <TrustBundle >();
171+
172+ TrustBundle bundle = new TrustBundle ();
173+ bundle .setBundleName ("testBundle1" );
174+ File fl = new File ("src/test/resources/bundles/providerTestBundle.p7b" );
175+ bundle .setBundleURL (filePrefix + fl .getAbsolutePath ());
176+ bundle .setRefreshInterval (24 );
177+ bundle .setSigningCertificateData (null );
178+ bundles .add (bundle );
179+
180+ return bundles ;
181+ }
182+ catch (Exception e )
183+ {
184+ throw new RuntimeException (e );
185+ }
186+ }
187+
188+ @ Override
189+ protected TrustBundle getBundleDataToUpdate () throws Exception
190+ {
191+ final TrustBundle bundleData = new TrustBundle ();
192+ bundleData .setBundleName ("testBundle1" );
193+ File fl = new File ("src/test/resources/bundles/providerTestBundle.p7b" );
194+ bundleData .setBundleURL (filePrefix + fl .getAbsolutePath ());
195+ bundleData .setRefreshInterval (24 );
196+ bundleData .setSigningCertificateData (null );
197+
198+ return bundleData ;
199+
200+ }
201+
202+ @ Override
203+ protected String getBundleToUpdate ()
204+ {
205+ return "testBundle1" ;
206+ }
207+
208+ @ Override
209+ protected String getBundleUpdatedName ()
210+ {
211+ return "testBundle1" ;
212+ }
213+
214+ protected void doAssertions (TrustBundle bundle ) throws Exception
215+ {
216+ final TrustBundle addedBundle = this .bundles .iterator ().next ();
217+
218+ assertEquals (getBundleUpdatedName (), bundle .getBundleName ());
219+ assertNull (bundle .getSigningCertificateAsX509Certificate ());
220+ assertEquals (addedBundle .getBundleURL (), bundle .getBundleURL ());
221+ assertEquals (24 , bundle .getRefreshInterval ());
222+ }
223+ }.perform ();
224+ }
225+
158226 @ Test
159227 public void testUpdateBundleAttributes_newSigningCert_assertSigningCertChanged () throws Exception
160228 {
0 commit comments