it('dispatches ACTION_TYPES.RESET actions', async () => {
   const expectedActions = [
     {
       type: ACTION_TYPES.RESET
     }
   ];
   await store.dispatch(reset());
   expect(store.getActions()).toEqual(expectedActions);
 });
 it('should delete entity', () => {
   const payload = 'fake payload';
   const toTest = reducer(undefined, {
     type: SUCCESS(ACTION_TYPES.DELETE_CUSTOMERRELATION),
     payload
   });
   expect(toTest).toMatchObject({
     updating: false,
     updateSuccess: true
   });
 });
 it('should reset the state', () => {
   expect(
     reducer(
       { ...initialState, loading: true },
       {
         type: ACTION_TYPES.RESET
       }
     )
   ).toEqual({
     ...initialState
   });
 });
 it('dispatches ACTION_TYPES.FETCH_CUSTOMERRELATION actions', async () => {
   const expectedActions = [
     {
       type: REQUEST(ACTION_TYPES.FETCH_CUSTOMERRELATION)
     },
     {
       type: SUCCESS(ACTION_TYPES.FETCH_CUSTOMERRELATION),
       payload: resolvedObject
     }
   ];
   await store.dispatch(getEntity(42666)).then(() => expect(store.getActions()).toEqual(expectedActions));
 });
 it('should fetch a single entity', () => {
   const payload = { data: { 1: 'fake1' } };
   expect(
     reducer(undefined, {
       type: SUCCESS(ACTION_TYPES.FETCH_CUSTOMERRELATION),
       payload
     })
   ).toEqual({
     ...initialState,
     loading: false,
     entity: payload.data
   });
 });
 it('should fetch all entities', () => {
   const payload = { data: [{ 1: 'fake1' }, { 2: 'fake2' }] };
   expect(
     reducer(undefined, {
       type: SUCCESS(ACTION_TYPES.FETCH_CUSTOMERRELATION_LIST),
       payload
     })
   ).toEqual({
     ...initialState,
     loading: false,
     entities: payload.data
   });
 });
 it('should create/update entity', () => {
   const payload = { data: 'fake payload' };
   expect(
     reducer(undefined, {
       type: SUCCESS(ACTION_TYPES.CREATE_CUSTOMERRELATION),
       payload
     })
   ).toEqual({
     ...initialState,
     updating: false,
     updateSuccess: true,
     entity: payload.data
   });
 });
 it('should return the initial state', () => {
   testInitialState(reducer(undefined, {}));
 });
 types.forEach(e => {
   testFunction(reducer(undefined, { type: e, payload }));
 });