test_class.file: Week3/Day2/src/test/java/service/AbstractMessageServiceTest.java
test_class.identifier: AbstractMessageServiceTest
test_case.body: @Test
  	public void mockUnitTest() {
  		MessageService messageService = mock(MessageService.class);
  		// when(messageService.generateMessage("Luke")).thenReturn("Foo!");
  		when(messageService.generateMessage(anyString())).thenReturn("Foo!");
  
  		GreetingClient client = new GreetingClient(messageService);
  
  		assertEquals("FOO!", client.greetUser("doesn't matter"));
  
  		// Optionally verify how mock was used.
  		// verify(messageService).generateMessage("doesn't matter");
  	}
test_case.class_method_signature: AbstractMessageServiceTest.mockUnitTest()
test_case.full_signature: @Test public void mockUnitTest()
test_case.identifier: mockUnitTest
test_case.invocations: mock thenReturn when generateMessage anyString assertEquals greetUser
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void mockUnitTest()
focal_class.file: Week3/Day2/src/main/java/service/AbstractMessageService.java
focal_class.identifier: AbstractMessageService
focal_class.interfaces: implements MessageService
focal_class.class_method_signature: AbstractMessageService.generateMessage(String name)
focal_class.full_signature: @Override public final String generateMessage(String name)
focal_class.identifier: generateMessage
focal_class.modifiers: @Override public final
focal_class.parameters: (String name)
focal_class.return: String
focal_class.signature: String generateMessage(String name)
focal_class.class_method_signature: AbstractMessageService.getHelloText()
focal_class.full_signature: protected abstract String getHelloText()
focal_class.identifier: getHelloText
focal_class.modifiers: protected abstract
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getHelloText()
focal_class.class_method_signature: AbstractMessageService.getTemplate()
focal_class.full_signature: protected String getTemplate()
focal_class.identifier: getTemplate
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getTemplate()
focal_method.body: @Override
  	public final String generateMessage(String name) {
  		return String.format(getTemplate(),  getHelloText(), name);
  	}
focal_method.class_method_signature: AbstractMessageService.generateMessage(String name)
focal_method.full_signature: @Override public final String generateMessage(String name)
focal_method.identifier: generateMessage
focal_method.invocations: format getTemplate getHelloText
focal_method.modifiers: @Override public final
focal_method.parameters: (String name)
focal_method.return: String
focal_method.signature: String generateMessage(String name)