I have been given an online task in which I am supposed to develop a service which is based on some other class/service which has not been implemented yet but I have a rough API for that and the results return by my class would be used by some other class/service

I am not sure what would be the best way to return this. I mean shall I have some dummy/mock implementation for the service I am expecting or using in my class and also for the service that would use the result returned by my class or is it Ok to just develop my part and assume things based on the rough API spec.

For example : I am in Team C and have to implement CService service. My class will call Team A's AService service (this is not implemented yet but I have a rough spec for this) and the results returned by my class would be used by Team B's service.

2 Answers 2


You should use a stub/mock for the classes/services that you are using. That way you can test your own code without needing those classes/services.

For the code that calls you (Team B's service), you don't need to provide stubs/mocks. Your testcases should cover that side.

At the same time, try to keep a good communication with teams A and B. It will help to get a common understanding of how each API is expected to be used and, unless you are in a very strict development method, you might be able to change it still to make your development easier.


Make sure you're up to date with the other teams' progress and details, and also develop your own dummy service. This way you can test your code, create various dummy scenarios, and still keep it relevant to what the other team is developing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.