@Test
public void assignCallsAssignForClient() throws Exception {

  assignActionConfig.assignType = Arrays.asList("client");
  assignActionConfig.name = "existing-client-name";
  assignActionConfig.group = group.getName();
  Client client =
      new Client(5673, assignActionConfig.name, null, null, null, null, null, null, null, null, false,
          true
      );
  // Group exists
  when(keywhizClient.getGroupByName(group.getName())).thenReturn(group);
  // Client exists
  when(keywhizClient.getClientByName(assignActionConfig.name)).thenReturn(client);
  // Client not assigned to group
  when(keywhizClient.groupDetailsForId(group.getId())).thenReturn(groupDetailResponse);
  assignAction.run();
  verify(keywhizClient, never()).createClient(anyString(), anyString(), anyString());
  verify(keywhizClient).enrollClientInGroupByIds(client.getId(), group.getId());
}