BlueprintFactory { public Blueprint getBlueprint(String blueprintName) throws NoSuchStackException { BlueprintEntity entity = blueprintDAO.findByName(blueprintName); return entity == null ? null : new BlueprintImpl(entity); } BlueprintFactory(); protected  BlueprintFactory(StackFactory stackFactory); Blueprint getBlueprint(String blueprintName); @SuppressWarnings("unchecked") Blueprint createBlueprint(Map<String, Object> properties, SecurityConfiguration securityConfiguration); @Inject static void init(BlueprintDAO dao);  }
@Test public void testGetBlueprint_NotFound() throws Exception { expect(dao.findByName(BLUEPRINT_NAME)).andReturn(null).once(); replay(dao, entity, configEntity); assertNull(factory.getBlueprint(BLUEPRINT_NAME)); }