ProtectDelegator extends BaseDelegator implements IProtectDelegator { @Override public String updateProtectionEntries(@Nonnull final List<IProtectionEntry> entryList) throws P4JavaException { return createProtectionEntries(entryList); } ProtectDelegator(IOptionsServer server); @Override String createProtectionEntries(@Nonnull final List<IProtectionEntry> entryList); @Override String updateProtectionEntries(@Nonnull final List<IProtectionEntry> entryList); @Override InputStream getProtectionsTable();  }
@SuppressWarnings("unchecked") @Test public void updateProtectionEntries() throws Exception { resultMaps = buildProtectionEntries(); when(server.execMapCmdList(eq(PROTECT.toString()), eq(CREATE_CMD_ARGUMENTS), any(Map.class))) .thenReturn(resultMaps); String protectionEntries = protectDelegator.updateProtectionEntries(entryList); assertThat(protectionEntries, is(infoMessage)); }
@Test public void updateProtectionEntries() throws Exception { resultMaps = buildProtectionEntries(); when(server.execMapCmdList(eq(PROTECT.toString()), eq(CREATE_CMD_ARGUMENTS), anyMap())) .thenReturn(resultMaps); String protectionEntries = protectDelegator.updateProtectionEntries(entryList); assertThat(protectionEntries, is(infoMessage)); }