@Test
public void testFindInvalidCircuitBreakerBean() {

    String breakerName = "testFindInvalid";
    // Create a map with an invalid CircuitBreaker (non-bean) in it, and jam it in.
    ConcurrentHashMap<String, CircuitBreaker> invalidMap = new ConcurrentHashMap<String, CircuitBreaker>();
    invalidMap.put(breakerName, new CircuitBreaker());
    ReflectionTestUtils.setField(factory, "circuitBreakerMap", invalidMap);
    // Try to find it.
    CircuitBreakerBean foundBreaker = factory.findCircuitBreakerBean(breakerName);
    assertNull(foundBreaker);
}