@Test public void testClearPermission() { final ClientPermissions clientPermission = new ClientPermissions(); Assert.assertEquals(0, clientPermission.getSecrets().size()); final String secret1 = "test1"; final String secret2 = "test2"; clientPermission.addPermission(secret1, Permissions.GENERATE); Assert.assertEquals(1, clientPermission.getSecrets().size()); clientPermission.addPermission(secret1, Permissions.DELETE); Assert.assertEquals(1, clientPermission.getSecrets().size()); clientPermission.addPermission(secret2, Permissions.GENERATE); Assert.assertEquals(2, clientPermission.getSecrets().size()); clientPermission.clearPermission(secret1); Assert.assertEquals(1, clientPermission.getSecrets().size()); clientPermission.clearPermission("none"); Assert.assertEquals(1, clientPermission.getSecrets().size()); clientPermission.clearPermission(secret2); Assert.assertEquals(0, clientPermission.getSecrets().size()); }
public void clearPermission(final String secretName) { this.secretPermissions.remove(secretName); }
ClientPermissions { public void clearPermission(final String secretName) { this.secretPermissions.remove(secretName); } }
ClientPermissions { public void clearPermission(final String secretName) { this.secretPermissions.remove(secretName); } ClientPermissions();  ClientPermissions(final Map<String, Integer> secretPermissions); }
ClientPermissions { public void clearPermission(final String secretName) { this.secretPermissions.remove(secretName); } ClientPermissions();  ClientPermissions(final Map<String, Integer> secretPermissions); void addPermission(final String secretName, final Permissions permission); void removePermission(final String secretName, final Permissions permission); boolean hasPermission(final String secretName, final Permissions permission); void clearPermission(final String secretName); void clearAllPermissions(); }
ClientPermissions { public void clearPermission(final String secretName) { this.secretPermissions.remove(secretName); } ClientPermissions();  ClientPermissions(final Map<String, Integer> secretPermissions); void addPermission(final String secretName, final Permissions permission); void removePermission(final String secretName, final Permissions permission); boolean hasPermission(final String secretName, final Permissions permission); void clearPermission(final String secretName); void clearAllPermissions();  }