@SuppressWarnings("unchecked")
public final void testGetParameters() {
List<Builder> ksbuilders;
KeyStore.Builder builder = new EmptyBuilder();
List<Object> result;
KeyStoreBuilderParameters param = new KeyStoreBuilderParameters(builder);
result = param.getParameters();
try {
result.add(new EmptyBuilder());
fail("The list is modifiable");
} catch (UnsupportedOperationException e) {
}
assertEquals("incorrect size", 1, result.size());
assertTrue("incorrect list", result.contains(builder));
ksbuilders = new ArrayList<Builder>();
ksbuilders.add(builder);
ksbuilders.add(new EmptyBuilder());
param = new KeyStoreBuilderParameters(ksbuilders);
result = param.getParameters();
try {
result.add(new Object());
fail("The list is modifiable");
} catch (UnsupportedOperationException e) {
}