@Test
public void testCheckNotAllowedMethod()
{

    // Create a list of methods to be blocked.
    String blockedMethodListAsText = STRING_VALUE;
    List<String> blockedMethods = Arrays.asList(METHOD_NAME);
    // Create a mock configuration entity.
    ConfigurationEntity configurationEntity = mock(ConfigurationEntity.class);
    when(configurationEntity.getValueClob()).thenReturn(blockedMethodListAsText);
    // Mock the external calls.
    when(configurationDao.getConfigurationByKey(ConfigurationValue.NOT_ALLOWED_HERD_ENDPOINTS.getKey())).thenReturn(configurationEntity);
    when(herdStringHelper.splitStringWithDefaultDelimiter(blockedMethodListAsText)).thenReturn(blockedMethods);
    // Try to call the method under test.
    try
    {
        configurationDaoHelper.checkNotAllowedMethod(METHOD_NAME);
        fail();
    }
    catch (MethodNotAllowedException e)
    {
        assertEquals("The requested method is not allowed.", e.getMessage());
    }
    // Verify the external calls.
    verify(configurationDao).getConfigurationByKey(ConfigurationValue.NOT_ALLOWED_HERD_ENDPOINTS.getKey());
    verify(herdStringHelper).splitStringWithDefaultDelimiter(blockedMethodListAsText);
    verifyNoMoreInteractionsHelper();
}