As part of integrating the WebSphere
Commerce REST services in Angular2 application, created bunch of WCS MOCK REST
Services for unit testing using SOAP UI. It helps to test multiple scenarios
(different data and fail scenarios
...etc).

You can use SOAPUI or other tools
to mock the REST services during the development.

1.Create and Start mock services (or you may
backend services running on different port)

While creating the MOCK Service, I
have given following port and host address.

Start the mock services by clicking
“run” button, then you can access mock services on http://localhost:4646

Problem : You will see
the problem similar to below when you try to access these MOCK services from
the Angular2 App because of cross domain (same origin) policy issues, We can
mitigate this by adding Cross-Origin-Resource-Sharing (CORS) headers in server level , if you
backend (api server) supports.