@Test public void testNeitherImplement() { String hello = "hello"; String world = "world"; SchemaNegotiator.negotiate(hello, world); }
public static void negotiate(Object parent, Object child) { if (parent instanceof UsesExpectedSchema && child instanceof DeclaresExpectingSchema) { ((UsesExpectedSchema)parent).receiveExpectedSchema( ((DeclaresExpectingSchema)child).getExpectingSchema()); } if (child instanceof UsesProvidedSchema && parent instanceof DeclaresProvidingSchema) { ((UsesProvidedSchema)child).receiveProvidedSchema( ((DeclaresProvidingSchema)parent).getProvidingSchema()); } }
SchemaNegotiator { public static void negotiate(Object parent, Object child) { if (parent instanceof UsesExpectedSchema && child instanceof DeclaresExpectingSchema) { ((UsesExpectedSchema)parent).receiveExpectedSchema( ((DeclaresExpectingSchema)child).getExpectingSchema()); } if (child instanceof UsesProvidedSchema && parent instanceof DeclaresProvidingSchema) { ((UsesProvidedSchema)child).receiveProvidedSchema( ((DeclaresProvidingSchema)parent).getProvidingSchema()); } } }
SchemaNegotiator { public static void negotiate(Object parent, Object child) { if (parent instanceof UsesExpectedSchema && child instanceof DeclaresExpectingSchema) { ((UsesExpectedSchema)parent).receiveExpectedSchema( ((DeclaresExpectingSchema)child).getExpectingSchema()); } if (child instanceof UsesProvidedSchema && parent instanceof DeclaresProvidingSchema) { ((UsesProvidedSchema)child).receiveProvidedSchema( ((DeclaresProvidingSchema)parent).getProvidingSchema()); } }  }
SchemaNegotiator { public static void negotiate(Object parent, Object child) { if (parent instanceof UsesExpectedSchema && child instanceof DeclaresExpectingSchema) { ((UsesExpectedSchema)parent).receiveExpectedSchema( ((DeclaresExpectingSchema)child).getExpectingSchema()); } if (child instanceof UsesProvidedSchema && parent instanceof DeclaresProvidingSchema) { ((UsesProvidedSchema)child).receiveProvidedSchema( ((DeclaresProvidingSchema)parent).getProvidingSchema()); } }  static void negotiate(Object parent, Object child); }
SchemaNegotiator { public static void negotiate(Object parent, Object child) { if (parent instanceof UsesExpectedSchema && child instanceof DeclaresExpectingSchema) { ((UsesExpectedSchema)parent).receiveExpectedSchema( ((DeclaresExpectingSchema)child).getExpectingSchema()); } if (child instanceof UsesProvidedSchema && parent instanceof DeclaresProvidingSchema) { ((UsesProvidedSchema)child).receiveProvidedSchema( ((DeclaresProvidingSchema)parent).getProvidingSchema()); } }  static void negotiate(Object parent, Object child);  }