I am working on java. I have this class ConfigServer
that extends the class GeneralServer
, to clarify I mean: public class ConfigServer extends GeneralServer
. What I want to do is to create an instance of ConfigServer
but isolated from the superclass functionality. Is possible programmatically to make something like this in a way that the solution wouldn’t affect the current architecture and inheritance?
I need to make this isolation because if I use the actual DbServer
class then I need to configure the whole environment that will hosts a database which will communicate with the DbServer
but I need to avoid this time consuming process. So as I can think the only manner that I could be something like this, is to create a new class for example ConfigServerTestImpl
but I think that is not the appropriate way to implement integration test for between two classes.